Implement pygrep language as a replacement for pcre

This commit is contained in:
Anthony Sottile 2017-09-22 17:06:48 -07:00
parent 3a7806ea30
commit e9509306d8
8 changed files with 186 additions and 112 deletions

View file

@ -73,7 +73,7 @@ def config_with_local_hooks():
('id', 'do_not_commit'),
('name', 'Block if "DO NOT COMMIT" is found'),
('entry', 'DO NOT COMMIT'),
('language', 'pcre'),
('language', 'pygrep'),
('files', '^(.*)$'),
))],
),

View file

@ -1,16 +0,0 @@
- id: regex-with-quotes
name: Regex with quotes
entry: "foo'bar"
language: pcre
files: ''
- id: other-regex
name: Other regex
entry: ^\[INFO\]
language: pcre
files: ''
- id: regex-with-grep-args
name: Regex with grep extra arguments
entry: foo.+bar
language: pcre
files: ''
args: [-i]