Very rough start to adding a pre-commit pass.
This commit is contained in:
parent
60e3e8d328
commit
3f77c5e476
|
@ -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))
|
Loading…
Reference in New Issue