-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[ci] Don't diff when running clang-format #10933
Conversation
This takes about 15-20 extra seconds but has the benefit of allowing users to replicate and fix clang format issues locally with ease.
Right this should fix the issue you had earlier regarding the difference in output between CI / local |
# check lastest change, for squash merge into main | ||
./tests/lint/git-clang-format.sh HEAD~1 | ||
# chekc against origin/main for PRs. | ||
./tests/lint/git-clang-format.sh origin/main |
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.
confused, shouldn't this have caught all of these mis-formats?
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.
it only ran against the diff, these must have snuck in at some point and then they would only come up when those file names were changed
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.
got it, this makes more sense. reviewed more carefully now
* [ci] Don't diff when running clang-format This takes about 15-20 extra seconds but has the benefit of allowing users to replicate and fix clang format issues locally with ease. * format files * Add --fix flag * Comments Co-authored-by: driazati <driazati@users.noreply.github.com>
* [ci] Don't diff when running clang-format This takes about 15-20 extra seconds but has the benefit of allowing users to replicate and fix clang format issues locally with ease. * format files * Add --fix flag * Comments Co-authored-by: driazati <driazati@users.noreply.github.com>
This takes about 15-20 extra seconds but has the benefit of allowing users to replicate and fix clang format issues locally with ease. This also adds a
--fix
flag toci.py
that can be used to run the Docker image clang-format/black in-place on the mounted repo:The second commit in this PR contains all the formatting fix-ups necessary.
cc @areusch