mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-18 11:31:46 +04:00
test
This commit is contained in:
parent
195c406b78
commit
fa92aa223f
4 changed files with 37 additions and 6 deletions
|
|
@ -73,7 +73,7 @@ SKIPPED = 'Skipped'
|
|||
NO_FILES = '(no files to check)'
|
||||
|
||||
|
||||
def _run_single_hook(classifier, hook, args, skips, cols):
|
||||
def _run_single_hook(classifier, hook, args, skips, cols, retval):
|
||||
filenames = classifier.filenames_for_hook(hook)
|
||||
|
||||
if hook.language == 'pcre':
|
||||
|
|
@ -211,7 +211,8 @@ def _run_hooks(config, hooks, args, environ):
|
|||
classifier = Classifier(filenames)
|
||||
retval = 0
|
||||
for hook in hooks:
|
||||
retval |= _run_single_hook(classifier, hook, args, skips, cols)
|
||||
args
|
||||
retval |= _run_single_hook(classifier, hook, args, skips, cols, retval)
|
||||
if retval and config['fail_fast']:
|
||||
break
|
||||
if retval and args.show_diff_on_failure and git.has_diff():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue