From: Joel Rosdahl Date: Sun, 27 Feb 2022 13:09:43 +0000 (+0100) Subject: chore: Improve hint in source code format error message X-Git-Tag: v4.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52cc4d484caf91a61e05511a70d0e12a9d401158;p=thirdparty%2Fccache.git chore: Improve hint in source code format error message --- diff --git a/misc/format-files b/misc/format-files index 44340b9f6..6671f8e1d 100755 --- a/misc/format-files +++ b/misc/format-files @@ -44,7 +44,9 @@ for file in "$@"; do if [ -n "$check" ]; then status=1 echo "Error: $file not formatted with Clang-Format" - echo 'Run "make format" or apply this diff:' + echo + echo 'Please run "make format" (or "ninja format"), or apply this diff:' + echo git diff $cf_color --no-index "$file" "$tmp_file" \ | sed -E -e "s!^---.*!--- a/$file!" \ -e "s!^\+\+\+.*!+++ b/$file!" \