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

Code formatting #33

Merged
merged 7 commits into from
Jun 25, 2019
Merged

Conversation

Banana1530
Copy link
Collaborator

No description provided.

@Banana1530 Banana1530 mentioned this pull request Jun 23, 2019
@Banana1530
Copy link
Collaborator Author

See https://github.com/Banana1530/MoMA-1/commits/codeformatting for the entire build history.

set -o nounset

bash script/diff_generator.sh

Copy link
Collaborator Author

@Banana1530 Banana1530 Jun 23, 2019

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.

# 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
Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Member

@michaelweylandt michaelweylandt left a 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.

@michaelweylandt michaelweylandt merged commit 08196ad into DataSlingers:master Jun 25, 2019
@Banana1530 Banana1530 deleted the codeformatting branch July 26, 2019 06:44
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

Successfully merging this pull request may close these issues.

2 participants