Last active
September 15, 2019 19:37
-
-
Save seppeljordan/cf6ec473699f2c4038d42bb549deca23 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
#!/usr/bin/env sh | |
# goes into .git/hooks/pre-commit | |
# do not forget 'chmod +x .git/hooks/pre-commit' | |
set -e | |
. ./format_code.sh | |
if ! git diff --exit-code > /dev/null 2>&1; then | |
echo "Incorrect formatting, run 'sh ./format_code.sh' to fix" | |
exit 1 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment