mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 10:31:46 +04:00
pre_commit: expose fail-fast argument for run subcommand
This patch exposes the fail-fast feature as a command-line argument for the run subcommand, allowing to run pre-commit to stop at the first failed hook without the need of temporarily writing it to the configuration file when temporarily needed. Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
d021bbfabd
commit
61efc539a4
5 changed files with 23 additions and 2 deletions
|
|
@ -57,6 +57,7 @@ xfailif_windows = pytest.mark.xfail(os.name == 'nt', reason='windows')
|
|||
|
||||
def run_opts(
|
||||
all_files=False,
|
||||
fail_fast=False,
|
||||
files=(),
|
||||
color=False,
|
||||
verbose=False,
|
||||
|
|
@ -78,6 +79,7 @@ def run_opts(
|
|||
assert not (all_files and files)
|
||||
return auto_namedtuple(
|
||||
all_files=all_files,
|
||||
fail_fast=fail_fast,
|
||||
files=files,
|
||||
color=color,
|
||||
verbose=verbose,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue