-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Update code base formatting #1276
base: develop
Are you sure you want to change the base?
Conversation
void precicec_writeBlockScalarData( | ||
int dataID, | ||
int size, | ||
const int * valueIndices, | ||
const double *values); | ||
void precicec_writeBlockScalarData(int dataID, int size, const int *valueIndices, const double *values); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this changes, clang-format
resolves the current formatting ambiguity of our code base (e.g. both code versions would have been accepted in our current formatting settings). However, having multiple function arguments on multiple lines might be desirable. Do we want to enforce something line breaks in function arguments or go with the current version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer one item per line. I find that it makes the signature easier to digest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I agree, these arguments
BinPackArguments: false
BinPackParameters: false
would set the arguments on separate lines if they don't fit into the 120 characters. Or do you want to enforce the separate line for all functions (cf the docs)?
Main changes of this PR
Upgrades the
clang-format
version toclang-format-12
, introduces a column limit of 120 as discussed in #1155 and applies corresponding changes to the code base. Resolves #1155. In case anyone has formatting objections, now would be a good time to mention them.Author's checklist
make changelog
if there are user-observable changes since the last release.make format
to ensure everything is formatted correctly.Reviewers' checklist