mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Style check commit hook: Ensure that formatted files need to be re-added.
This commit is contained in:
parent
0e70578052
commit
2e7221cd22
@ -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…
x
Reference in New Issue
Block a user