[ci] Don't diff when running clang-format #10933
Merged
Merged
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.
Member
Author
|
Right this should fix the issue you had earlier regarding the difference in output between CI / local |
areusch
reviewed
Apr 8, 2022
| # 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 |
Contributor
There was a problem hiding this comment.
confused, shouldn't this have caught all of these mis-formats?
Member
Author
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
got it, this makes more sense. reviewed more carefully now
areusch
approved these changes
Apr 8, 2022
altanh
pushed a commit
to altanh/tvm
that referenced
this pull request
Apr 28, 2022
* [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>
areusch
added a commit
to areusch/tvm
that referenced
this pull request
Jun 2, 2022
jroesch
pushed a commit
that referenced
this pull request
Jun 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
--fixflag toci.pythat 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