Skip to content

Commit

Permalink
Merge pull request google#92 from google/precommit_hook
Browse files Browse the repository at this point in the history
Update precommit hook's max line length.
  • Loading branch information
enetor authored Jul 5, 2017
2 parents 7635c22 + ba4cd81 commit ed28f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ which >/dev/null pep8 || (echo "please install pep8"; exit 1)
files=$(git diff --name-only --staged --diff-filter=ACMRTUXB | egrep "*.py$")

if test -n "$files"; then
pep8 --max-line-length=120 $files
pep8 --max-line-length=100 $files
res=$?
if [ $res -ne 0 ]; then
echo
autopep8 --max-line-length=120 --diff $files
autopep8 --max-line-length=100 --diff $files
echo
echo "To fix run: autopep8 --max-line-length=120 -i $files"
echo "To fix run: autopep8 --max-line-length=100 -i $files"
fi
exit $res
fi

0 comments on commit ed28f2c

Please sign in to comment.