Skip to content

Instantly share code, notes, and snippets.

@coldfire-x
Created February 4, 2015 14:01
Show Gist options
  • Save coldfire-x/64012405704050382deb to your computer and use it in GitHub Desktop.
Save coldfire-x/64012405704050382deb to your computer and use it in GitHub Desktop.
pre-commit hook run pep8 against py files
#!/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