mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +08:00
show bad formatting diff
This commit is contained in:
committed by
Lorenz Meier
parent
4d0bb9f1e2
commit
b65291579f
@@ -9,6 +9,13 @@ then
|
|||||||
${DIR}/fix_code_style.sh --dry-run $file | grep --quiet Formatted
|
${DIR}/fix_code_style.sh --dry-run $file | grep --quiet Formatted
|
||||||
if [[ $? -eq 0 ]]
|
if [[ $? -eq 0 ]]
|
||||||
then
|
then
|
||||||
|
${DIR}/fix_code_style.sh --quiet < $file > $file.pretty
|
||||||
|
|
||||||
|
echo
|
||||||
|
git diff --no-index --minimal --histogram --color=always $file $file.pretty
|
||||||
|
echo
|
||||||
|
|
||||||
|
rm -f $file.pretty
|
||||||
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
|
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user