filtering files for code check seperately to enable fast use of git pre-commit hook to check code style

ask user to install pre-commit hook when code style is checked
This commit is contained in:
Andreas Antener
2016-08-22 23:20:27 +02:00
parent 93201835d3
commit cbbf5e2e7c
8 changed files with 136 additions and 67 deletions
-9
View File
@@ -1,14 +1,5 @@
#!/bin/bash
ASTYLE_VER=`astyle --version`
ASTYLE_VER_REQUIRED="Artistic Style Version 2.05.1"
if [ "$ASTYLE_VER" != "$ASTYLE_VER_REQUIRED" ]; then
echo "Error: you're using ${ASTYLE_VER}, but PX4 requires ${ASTYLE_VER_REQUIRED}"
echo "You can get the correct version here: https://github.com/PX4/astyle/releases/tag/2.05.1"
exit 1
fi
if [[ $# -eq 0 ]] ; then
exit 0
fi