Skip to content

Instantly share code, notes, and snippets.

@edvardm
Created April 24, 2018 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edvardm/5b92602352c09fde41fb399e6f17c12b to your computer and use it in GitHub Desktop.
Save edvardm/5b92602352c09fde41fb399e6f17c12b to your computer and use it in GitHub Desktop.
Simple pre-commit hook for checking python files with pycodestyle before committing
#!/bin/sh
set -u
FILES=$(git diff --cached --name-only --diff-filter=ACM)
pycodestyle ${FILES}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment