-
Notifications
You must be signed in to change notification settings - Fork 273
Use Ubuntu-provided git-clang-format in CI check #7160
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 Ubuntu-provided git-clang-format in CI check #7160
Conversation
Codecov ReportBase: 77.88% // Head: 77.88% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7160 +/- ##
========================================
Coverage 77.88% 77.88%
========================================
Files 1576 1576
Lines 181856 181859 +3
========================================
+ Hits 141645 141648 +3
Misses 40211 40211
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
wget -O git-clang-format https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-14.0.6/clang/tools/clang-format/git-clang-format | ||
chmod u+x git-clang-format | ||
mv git-clang-format /usr/local/bin | ||
sudo apt-get install --no-install-recommends -yq clang-format clang-format-11 |
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.
Why is this installing both clang-format
and clang-format-11
?
Mind you that both appear to install a git-clang-format
binary, the first one installs git-clang-format-10
and the second git-clang-format-11
. Surely these clash in terms of path?
https://packages.ubuntu.com/focal-updates/amd64/clang-format-11/filelist
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
package installs git-clang-format
, while the others install one with a version suffix. We need/want the one without a version suffix, hence the need to install both clang-format
as well as clang-format-11
.
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.
So the no suffix version of git-clang-format
wouldn't be needed, if we just update .github/workflows/pull-request-check-clang-format.sh
to run git-clang-format-11
instead?
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 that's true, yes. I'll give that one a try.
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.
Done.
The 14.0.6 version of git-clang-format (which was introduced in b377779) appears to be incompatible with clang-format-11. The result was that context lines of the diff got formatted as well, as seen in https://github.com/diffblue/cbmc/actions/runs/3141827465/jobs/5104706348. Using the distribution-provided version of git-clang-format fixes this problem.
bb13899
to
6d6319f
Compare
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 14.0.6 version of git-clang-format (which was introduced in b377779) appears to be incompatible with clang-format-11. The result was that context lines of the diff got formatted as well, as seen in
https://github.com/diffblue/cbmc/actions/runs/3141827465/jobs/5104706348.
Using the distribution-provided version of git-clang-format fixes this problem.