diff --git a/Tools/astyle/pre-commit b/Tools/astyle/pre-commit index 31b5a61bb2..4b58b2a8cf 100755 --- a/Tools/astyle/pre-commit +++ b/Tools/astyle/pre-commit @@ -31,7 +31,7 @@ if [ "$allownonascii" != "true" ] && test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then - echo "Error: Attempt to add a non-ascii file name." + echo "Pre-commit style error: Attempt to add a non-ascii file name." echo echo "This can cause problems if you want to work" echo "with people on other platforms." @@ -49,6 +49,7 @@ fi # If there are whitespace errors, print the offending file names and fail. git diff-index --check --cached $against -- if [ $? -ne 0 ]; then + echo "Pre-commit style error: Whitespace issues" exit 1 fi @@ -58,6 +59,7 @@ do ./Tools/astyle/files_to_check_code_style.sh $i | xargs -n 1 -P 8 -I % ./Tools/astyle/check_code_style.sh % if [ $? -ne 0 ] then + echo "Pre-commit style error: Bad formatting according to astyle rules" exit 1 fi done