diff options
author | Thomas Haller <thaller@redhat.com> | 2023-04-18 18:53:02 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-04-18 19:05:02 +0200 |
commit | cae2011b087df55c41e2f9ded636832d80c5487f (patch) | |
tree | 31ce788c169292a0e5dc14b8c7ac5b8ef676025a | |
parent | cab80c5129b293a9459d72bd4339f56a62b85eba (diff) | |
download | NetworkManager-cae2011b087df55c41e2f9ded636832d80c5487f.tar.gz |
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).
-rwxr-xr-x | contrib/scripts/nm-code-format.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/scripts/nm-code-format.sh b/contrib/scripts/nm-code-format.sh index 38556c500f..0ecce3321f 100755 --- a/contrib/scripts/nm-code-format.sh +++ b/contrib/scripts/nm-code-format.sh @@ -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." |