Skip to content

Instantly share code, notes, and snippets.

@tuatara
Created July 26, 2016 00:06
Show Gist options
  • Save tuatara/4c6bb5683c7c0fb86314ebb9677150c9 to your computer and use it in GitHub Desktop.
Save tuatara/4c6bb5683c7c0fb86314ebb9677150c9 to your computer and use it in GitHub Desktop.
Lint python files on commit
#!/bin/sh
# Make executable, and save in .git/hooks
# Happily, flake8 will ignore non-python files
git diff --cached --name-only --diff-filter=ACM | flake8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment