20 lines
438 B
Python
Executable File
20 lines
438 B
Python
Executable File
#!/usr/bin/env python
|
|
from git_lint import load_config, run_linters, git_base
|
|
|
|
def main(*args):
|
|
if git_base is None:
|
|
sys.exit(_('A git repository was not found.'))
|
|
|
|
pre_commit_config = {
|
|
'staging': True,
|
|
'base': True
|
|
}
|
|
|
|
config = load_config(pre_commit_config, git_base)
|
|
return run_linters(pre_commit_config, config, [])
|
|
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
sys.exit(main(*sys.argv))
|