Browse Source

Style check commit hook: Ensure that formatted files need to be re-added.

sbg
Lorenz Meier 5 years ago
parent
commit
2e7221cd22
  1. 3
      Tools/astyle/check_code_style.sh

3
Tools/astyle/check_code_style.sh

@ -16,6 +16,9 @@ if [ -f "$FILE" ]; then @@ -16,6 +16,9 @@ if [ -f "$FILE" ]; then
if [[ $PX4_ASTYLE_FIX -eq 1 ]]; then
${DIR}/fix_code_style.sh $FILE
else
# Make sure this file is not staged for comitting
git reset $FILE
# Provide instructions
echo $FILE 'bad formatting, please run "make format" or "./Tools/astyle/fix_code_style.sh' $FILE'"'
exit 1
fi

Loading…
Cancel
Save