Last active
April 13, 2018 18:36
-
-
Save gevann/c5538cb1d8e6f5da0b03ca262197b3a6 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
echo | |
echo "Running CodeClimate" | |
CLIMATE_ISSUES=$(git --no-pager diff --diff-filter=ACMR --name-only master \ | |
| xargs codeclimate analyze \ | |
| tee /dev/tty \ | |
| tail -n 1 \ | |
| cut -f 4 -d' ') | |
if [ "$CLIMATE_ISSUES" -gt 0 ] | |
then | |
echo | |
echo "\033[0;31mcodeclimate > pre-commit hook failed (add --no-verify to bypass)" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment