-
Notifications
You must be signed in to change notification settings - Fork 1
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
Set a policy on whitespace use and enforce it #11
Comments
How about defining a clang-format file and have a hook check all commits against the format? |
Never heard about clang format files, but a hook checking would certainly lead to more consistent results. |
About clang-format: https://clang.llvm.org/docs/ClangFormat.html The level of checking/corrections can be specified in the formats file. We use this at work to check consistency with our Coding Guidelines. |
So first step would be to specify this formats file or someone picks an existing one, we can agree on. This would already allow to add new code in the desired format, even without a repository hook. |
Just found this: http://cf.monofraps.net/ There are lot of C++ styles out there, but I have not found an explicit C style yet. We need to consent on a C-based coding style anyways, as there are already different styles in the available code. |
Some more: A blog article on the topic: https://opensource.com/article/17/1/coding-style |
Currently indentation is done by mixed tabs and spaces and different indentation levels (2 spaces, 4 spaces, …). Choose one policy and stick to it, maybe with editor modelines.
The text was updated successfully, but these errors were encountered: