mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Add support for python and ruby local hooks
This commit is contained in:
parent
e5669ca135
commit
377cffbd27
12 changed files with 54 additions and 11 deletions
|
|
@ -66,14 +66,14 @@ def modify_config(path='.', commit=True):
|
|||
cmd_output('git', 'commit', '-am', 'update config', cwd=path)
|
||||
|
||||
|
||||
def config_with_local_hooks():
|
||||
def config_with_local_hooks(language='pcre'):
|
||||
return OrderedDict((
|
||||
('repo', 'local'),
|
||||
('hooks', [OrderedDict((
|
||||
('id', 'do_not_commit'),
|
||||
('name', 'Block if "DO NOT COMMIT" is found'),
|
||||
('entry', 'DO NOT COMMIT'),
|
||||
('language', 'pcre'),
|
||||
('id', language),
|
||||
('name', language),
|
||||
('entry', language),
|
||||
('language', language),
|
||||
('files', '^(.*)$'),
|
||||
))])
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue