mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-04 15:21:12 +00:00
contrib: show clang-format version in failure message
The actual formatting depends on the version of clang-format. Print the used version, which is in particular interesting when we get an error in our gitlab-ci check (which uses the correct version).
This commit is contained in:
parent
cab80c5129
commit
cae2011b08
|
@ -208,7 +208,7 @@ if [ $TEST_ONLY = 1 ]; then
|
|||
trap 'rm -f "$FF"' EXIT
|
||||
clang-format "$f" 2>/dev/null > "$FF"
|
||||
git --no-pager diff "$f" "$FF" || :
|
||||
die "Error: file \"$f\" has code-style is wrong. Fix it by running "'`'"\"$0\" -i \"$f\""'`'
|
||||
die "Error: file \"$f\" has style issues."$'\n'"Fix it by running \`\"$0\" -i \"$f\"\` using $(clang-format --version)"
|
||||
fi
|
||||
done
|
||||
die "an unknown error happened."
|
||||
|
|
Loading…
Reference in a new issue