-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Use released clang-format instead of the one from dev branch #9646
Conversation
e5e37cb
to
38029c2
Compare
@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
.github/workflows/sanity_check.yml
Outdated
with: | ||
args: https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/clang-format-diff.py | ||
- name: Install clang-format | ||
run: sudo apt-get install clang-format |
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.
The clang-format downloaded here can still be a different version and generate different result, depending on the instance provided by Github.
How about stable google style?
https://raw.githubusercontent.com/llvm-mirror/clang/google/stable/tools/clang-format/clang-format-diff.py
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.
The repo is marked archived: https://github.com/llvm-mirror/clang/tree/google/stable and it's version will be too old (eventually).
How about we ping it to a certain version like:
apt-get install clang-format-11
(currently ubuntu default is clang-format-10)
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.
Or we can provide a clang-format-diff.py
from our s3, which is likely clang-format-11 release (the latest 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.
Then I think it better just use the tool from a release branch instead of main. Updated.
Better use the released clang-format version instead of the one from dev branch. Otherwise the format report could be inconsistent with local development env and CI. e.g.: facebook#9644 Test Plan: CI
This reverts commit 01a8cdc9579fe752dcfa02e9ca6bab30c9192c72.
38029c2
to
5c3780f
Compare
@jay-zhuang has updated the pull request. You must reimport the pull request before landing. |
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.
LGTM. Thanks @jay-zhuang for the improvement!
@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…k#9646) Summary: We should use the released clang-format version instead of the one from dev branch. Otherwise the format report could be inconsistent with local development env and CI. e.g.: facebook#9644 Pull Request resolved: facebook#9646 Test Plan: CI Reviewed By: riversand963 Differential Revision: D34554065 Pulled By: jay-zhuang fbshipit-source-id: b841bc400becb4272be18c803eb03a7a1172da6f
…k#9646) Summary: We should use the released clang-format version instead of the one from dev branch. Otherwise the format report could be inconsistent with local development env and CI. e.g.: facebook#9644 Pull Request resolved: facebook#9646 Test Plan: CI Reviewed By: riversand963 Differential Revision: D34554065 Pulled By: jay-zhuang fbshipit-source-id: b841bc400becb4272be18c803eb03a7a1172da6f Signed-off-by: tabokie <xy.tao@outlook.com>
We should use the released clang-format version instead of the one from
dev branch. Otherwise the format report could be inconsistent with local
development env and CI. e.g.: #9644
Test Plan: CI