From 52cc4d484caf91a61e05511a70d0e12a9d401158 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 27 Feb 2022 14:09:43 +0100 Subject: [PATCH] chore: Improve hint in source code format error message --- misc/format-files | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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!" \ -- 2.47.2