Add fail_fast support per-hook

This commit is contained in:
Stojan Nedic 2021-10-19 22:17:42 +02:00 committed by Anthony Sottile
parent ae53a8eb65
commit 63ae399db0
5 changed files with 16 additions and 1 deletions

View file

@ -290,7 +290,7 @@ def _run_hooks(
verbose=args.verbose, use_color=args.color,
)
retval |= current_retval
if retval and config['fail_fast']:
if retval and (config['fail_fast'] or hook.fail_fast):
break
if retval and args.show_diff_on_failure and prior_diff:
if args.all_files: