Created
July 8, 2013 15:21
-
-
Save rizumu/5949773 to your computer and use it in GitHub Desktop.
pep8 git pre-commit hook
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 | |
# Auto-check for pep8 so I don't check in bad code | |
FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.py$') | |
if [ -n "$FILES" ]; then | |
flake8 --max-line-length=100 $FILES | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment