Skip to content

Instantly share code, notes, and snippets.

@toff63
Last active September 15, 2016 22:56
Show Gist options
  • Select an option

  • Save toff63/c3b6f4e4b80e6aaeeeb604dad09efda5 to your computer and use it in GitHub Desktop.

Select an option

Save toff63/c3b6f4e4b80e6aaeeeb604dad09efda5 to your computer and use it in GitHub Desktop.
  1. Install git-pylint-commit-hook pip install git-pylint-commit-hook
  2. Add git pylint to a git repo as a hook cd my_git_repo/.git/hooks echo '#!/bin/sh git-pylint-commit-hook ' > pre-commit
  3. Make the script runnable chmod 755 my_git_repo/.git/hooks
  4. Test committing a python script git commit -m 'Update my_file.py format to comply with PEP8' // Running pylint on my_file.py (file 1/1).. 9.8/10.00 PASSED // [master 3296b3d] Update my_file.py format to comply with PEP8 // file changed, 15 insertions(+), 4 deletions(-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment