Created
June 16, 2011 21:08
-
-
Save kumar303/1030280 to your computer and use it in GitHub Desktop.
Checks all changed and new files for pyflakes and pep8 errors (requires check.py)
This file contains hidden or 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
# Runs new and changed Python files through check.py and other checks | |
# https://github.com/jbalogh/check | |
if [ "$1" = "--help" ]; then | |
echo "usage: `basename $0` [<commit>{0,2}]" | |
exit 1 | |
fi | |
if [ "$1" != "" ]; then | |
REV=$1 | |
fi | |
git diff $REV --check | |
git diff --cached --check | |
git diff $REV --name-status | grep .py | awk '$1 != "R" { print $2 }' | xargs check.py | |
git diff --cached --name-status | grep .py | awk '$1 != "D" { print $2 }' | xargs check.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment