-
Notifications
You must be signed in to change notification settings - Fork 15
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
cpplint / clang-format / clang-tidy #276
Comments
I've come up with a To use:
NB:
Important features include:
Anyone else have any suggestions? |
Please create a PR with that file where you also apply it so we can have a closer look. I'd suggest we discuss this at the next in-person meeting and see if we can get everyone on board. Which clang-format version are you using? (If I could choose freely I'd vote for 14 because that's what we use in AutoPas and thus makes things more straight forward for us but anything is fine :) ) Bonus points if you also add a:
|
Okay, so after looking at the style guide and the older clangformat, I think there's a few more points to discuss here. All of this is clangformat 18. The most salient point seems to be that the older clangformat is based on Google, while the new one is based on LLVM. The most important differences I could see are below. However, the actual code has examples of both types of formatting.
I don't think the other differences are relevant. However, if others are curious, they are Something that is contrary to both standards, is the newline before an Now of course, it doesn't matter what we choose as the base style, because we can just edit one style into another. But I guess we should still agree on these specific details. I can keep the base style as google, to match the older clangformat file. I relist the changes I originally made here. These will stay, regardless of base style.
So there's 5 settings already agreed upon, and 6 settings we have to talk about. What preferences does everyone have? |
Can you add a comment in the style file on the purpose of |
To keep the same style in this project and also to prevent some simple bugs, some kind of (static) code analysis should be added. This can be e.g. cpplint or clang-format and/or clang-tidy. A first test was done in PR #260.
Implement:
The text was updated successfully, but these errors were encountered: