mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
POC for --dry-run param in run command
This commit is contained in:
parent
2280645d0e
commit
455fc07ad9
10 changed files with 40 additions and 10 deletions
|
|
@ -60,6 +60,12 @@ def _add_hook_type_option(parser: argparse.ArgumentParser) -> None:
|
|||
def _add_run_options(parser: argparse.ArgumentParser) -> None:
|
||||
parser.add_argument('hook', nargs='?', help='A single hook-id to run')
|
||||
parser.add_argument('--verbose', '-v', action='store_true', default=False)
|
||||
parser.add_argument(
|
||||
'--dry-run',
|
||||
action='store_true',
|
||||
help='Display the hook commands instead of run them (useful for debugging).',
|
||||
default=False,
|
||||
)
|
||||
mutex_group = parser.add_mutually_exclusive_group(required=False)
|
||||
mutex_group.add_argument(
|
||||
'--all-files', '-a', action='store_true', default=False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue