Very rough start to adding a pre-commit pass.

This commit is contained in:
Elf M. Sternberg 2016-09-26 16:03:08 -07:00
parent 60e3e8d328
commit 3f77c5e476
1 changed files with 20 additions and 0 deletions

20
bin/pre-commit Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python
import git_lint
def main(*args):
if git_lint.git_base is None:
sys.exit(_('A git repository was not found.'))
pre_commit_config = {
'staging': True,
'base': True,
'all': True
}
config = git_lint.get_config(pre_commit_config, git_lint.git_base)
return git_lint.run_gitlint(pre_commit_config, config, [])
if __name__ == '__main__':
import sys
sys.exit(main(*sys.argv))