Created
April 18, 2019 16:13
-
-
Save TerribleDev/0594e144539670af29cbf37b081ecb5d to your computer and use it in GitHub Desktop.
run checkstyle as git hook when java files have changed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javaCount=`git diff --cached --name-status | grep -i .java | wc -l | awk '{print $1}'` | |
if [ $javaCount -eq 0 ]; | |
then | |
exit 0 | |
else | |
exec ~/cargurus/cg-main/cargurus-build/local/devbox-push/run-checkstyle.sh | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment