-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1118: Add detection of the correct clang-format binary #766
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
Conversation
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.
Works for me!
scripts/clang-format.sh
Outdated
fi | ||
|
||
if [ x"$CLANG_FORMAT" = "x" ]; then | ||
echo "Couldn't find the right clang-format (needs version 6.0)" |
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.
Due to unrelated issues with the https://apt.llvm.org/ returning a "hash sum mismatch" error for the 6.0 packages only (unfortunate coincidence, I know), I'm only able to install clang-format-7
on my Ubuntu 16.04 machine.
If I modify this script to avoid the error and accept version "7.0", I can successfully run make format
just fine. Given that, can we tweak this to require >= 6.0 or perhaps major versions 6 and 7 if you're concerned about things breaking in a forthcoming 8.0 release?
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.
Supporting 6.0 and 7 works for me. But 8 can break things again...
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 suggest we just deal with that when the time comes. Any error will be hard to ignore when running make 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.
Do you want to make a PR against my branch for the "7.0" check?
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.
9b36054
to
a71b440
Compare
No description provided.