Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run indenter on the codebase? #131

Open
andrej-mitrovic-sociomantic opened this issue Apr 4, 2017 · 6 comments
Open

Run indenter on the codebase? #131

andrej-mitrovic-sociomantic opened this issue Apr 4, 2017 · 6 comments

Comments

@andrej-mitrovic-sociomantic
Copy link

andrej-mitrovic-sociomantic commented Apr 4, 2017

The 2-space indentation is awful to look at, and makes it hard to understand the code flow. Since we own the repo now, it would be a good idea to adapt it to our style guide.

@andrej-mitrovic-sociomantic
Copy link
Author

andrej-mitrovic-sociomantic commented Apr 4, 2017

Since this is a C repo, I highly recommend we take advantage of existing tools like uncrustify. There's also a GUI Frontend which can be used to generate a configuration for the indenter with a real-time preview. I've used it before and it's very capable.

@andreas-bok-sociomantic
Copy link
Contributor

andreas-bok-sociomantic commented Sep 5, 2017

Made a dev branch for testing out code formatting with uncrustify.
Any input on the formatting style is appreciated :)
https://github.com/andreas-bok-sociomantic/libdrizzle-redux/tree/uncrustify,
7b05efd for formatting applied to

@andreas-bok-sociomantic
Copy link
Contributor

@leandro-lucarella-sociomantic wondering if this is a not too insane way to add git pre hooks f2d9781

@leandro-lucarella-sociomantic
Copy link
Contributor

I usually prefer not to include magic scripts to install things like git hooks. Instead I prefer to rely on documentation. I think you just add a check in the CI to make sure PRs complies to the style using uncrustify. Then is the developer's responsibility to fix it, and you can point to the docs to include uncrustify as a hook.

@andreas-bok-sociomantic
Copy link
Contributor

Oki, i will look into adding a hook in Travis. So do you suggest not including the uncrustify formatting config file at all? Or just the install wrapper script which shouldn't be included?

@bokchan
Copy link
Collaborator

bokchan commented Jan 7, 2019

Created a development branch here, https://github.com/bokchan/libdrizzle-redux/tree/uncrustify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants