mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add pcre type.
This commit is contained in:
parent
38673941dc
commit
2cfd2818b5
11 changed files with 184 additions and 10 deletions
|
|
@ -2,18 +2,20 @@ from __future__ import unicode_literals
|
|||
|
||||
import shlex
|
||||
|
||||
from pre_commit.languages.helpers import file_args_to_stdin
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = None
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
"""Installation for system type is a noop."""
|
||||
raise AssertionError('Cannot install system repo.')
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
return repo_cmd_runner.run(
|
||||
['xargs'] + shlex.split(hook['entry']) + hook['args'],
|
||||
# TODO: this is duplicated in pre_commit/languages/helpers.py
|
||||
stdin='\n'.join(list(file_args) + ['']),
|
||||
stdin=file_args_to_stdin(file_args),
|
||||
retcode=None,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue