Created
February 4, 2015 14:01
-
-
Save coldfire-x/64012405704050382deb to your computer and use it in GitHub Desktop.
pre-commit hook run pep8 against py files
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 bash | |
git diff --cached -- '*.py' | `which pep8` --max-line-length=119 --show-source --diff | |
if [ $? -gt 0 ]; then | |
echo | |
echo '--------' | |
echo 'Lint check failed.' | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment