mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add first class support for golang hooks
This commit is contained in:
parent
209339582c
commit
068c18d38a
11 changed files with 151 additions and 7 deletions
|
|
@ -18,3 +18,18 @@ def environment_dir(ENVIRONMENT_DIR, language_version):
|
|||
|
||||
def to_cmd(hook):
|
||||
return tuple(shlex.split(hook['entry'])) + tuple(hook['args'])
|
||||
|
||||
|
||||
def assert_version_default(binary, version):
|
||||
if version != 'default':
|
||||
raise AssertionError(
|
||||
'For now, pre-commit requires system-installed {}'.format(binary),
|
||||
)
|
||||
|
||||
|
||||
def assert_no_additional_deps(lang, additional_deps):
|
||||
if additional_deps:
|
||||
raise AssertionError(
|
||||
'For now, pre-commit does not support '
|
||||
'additional_dependencies for {}'.format(lang),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue