Pre-commit hook for Git checking Python and Javascript code quality
The commit hook will automatically be called when you are running git commit
.
- pep8
- pyflakes
- ipdb
- console.log
- debugger
- JShint
- pep8 (
pip install pep8
) - pyflakes (
pip install pyflakes
) - jshint (
npm install -g jshint
)
- Save pre-commit as your_project/.git/hooks/pre-commit
- Mark pre-commit executable:
$ chmod +x your_project/.git/hooks/pre-commit
The hook can be overridden: $ git commit --no-verify
This code was forked from https://gist.github.com/spulec/1364640.