-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Added a clang_format.py to check the whole PR on CI #2816
Conversation
Wouldn't it be convenient to get this into 2.3? Dependent on if it is possible and feasible. |
60c1327
to
5f5ee12
Compare
OK, now targeting 2.3 |
Can we merge this now? |
|
||
cmd = ["git-clang-format"] | ||
|
||
source_commit = os.environ.get("PRE_COMMIT_SOURCE") |
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 think this is called PRE_COMMIT_FROM_REF in current versions of pre-commit.
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 is the new v2.2.0 value the old value is still supported.
Mine is 2.0.1
Something is wrong, the pre-commit-pr job failed and tried to reformat multiple source files. |
Superseded by: #2981 |
This fixes the issue that the pre-commit hook test on Travis successes even if there are pending clang-format issues.
This was due to not check the files and the PRE_COMMIT_SOURCE environment variable.
This PR fixes this.