-
Notifications
You must be signed in to change notification settings - Fork 4
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
Code formatting #33
Code formatting #33
Conversation
See https://github.com/Banana1530/MoMA-1/commits/codeformatting for the entire build history. |
set -o nounset | ||
|
||
bash script/diff_generator.sh | ||
|
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.
Run diff_generator.sh
, which formats files in-place. Then we use git to see whether any files have been changed. If the code is well formatted, then dirty=$(git ls-files --modified)
should return 0.
a49d37c
to
781db8a
Compare
# Defines the ANGLE style for automatic reformatting. | ||
# https://code.google.com/p/angleproject/wiki/CodingStandard | ||
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html | ||
Language: Cpp |
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.
https://github.com/google/angle/blob/master/.clang-format.
This .clang-format file is based on the file above and generated by the command clang-format -dump-config style=file
.
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.
Also the reason why we specify most of the parameters is that we should avoid inconsistency between different clang-format version. On travis CI clang-format-9 is installed for linux while clang-format-8 for Mac.
efcf3cb
to
b10334a
Compare
b10334a
to
7786ab6
Compare
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.
This looks good - I can't go through it all, but I'm assuming most of the changes are from the formatters so I'll trust them.
No description provided.