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

Move clang-format outside the sanity check #1012

Merged
merged 16 commits into from
Feb 2, 2020
Merged

Move clang-format outside the sanity check #1012

merged 16 commits into from
Feb 2, 2020

Conversation

gabrieldemarmiesse
Copy link
Member

@gabrieldemarmiesse gabrieldemarmiesse commented Feb 2, 2020

Linked to #991

Uses: https://github.com/DoozyX/clang-format-lint-action

The check runs in 20s but we need to upgrade the clang format version. We're using 3.8 but the stable version is 10 now. The github action that we're using supports version 5 to 9.

I propose we bit the bullet now and bump the clang format version to 9.

Instructions to install clang-format-9:

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -u 'http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
sudo apt install clang-format-9

format all with:

clang-format-9 -i --style=google **/*.cc **/*.h

The github action didn't support google style out of the box.
See DoozyX/clang-format-lint-action#3

I made a pull request for it: See DoozyX/clang-format-lint-action#5
and currently In the github file, I use a commit on my branch.

@gabrieldemarmiesse gabrieldemarmiesse marked this pull request as ready for review February 2, 2020 17:27
@gabrieldemarmiesse
Copy link
Member Author

This pull request is ready for review

Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! I would suggest also modify CONTRIBUTING.md so that developers know how to format cpp codes (as make code-format won't format cpp codes after this change). Thank you.

@boring-cyborg boring-cyborg bot added the style Related to repository's style label Feb 2, 2020
@gabrieldemarmiesse
Copy link
Member Author

@WindQAQ done

@WindQAQ WindQAQ self-requested a review February 2, 2020 20:05
Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@WindQAQ WindQAQ merged commit 3ddda23 into tensorflow:master Feb 2, 2020
@gabrieldemarmiesse gabrieldemarmiesse deleted the break_down_check_clang_format branch March 8, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants