mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Only show skipped messages in verbose mode
This commit is contained in:
parent
4f5cb99ff5
commit
12dde6d395
1 changed files with 21 additions and 19 deletions
|
|
@ -140,30 +140,32 @@ def _run_single_hook(
|
||||||
filenames = classifier.filenames_for_hook(hook)
|
filenames = classifier.filenames_for_hook(hook)
|
||||||
|
|
||||||
if hook.id in skips or hook.alias in skips:
|
if hook.id in skips or hook.alias in skips:
|
||||||
output.write(
|
if verbose:
|
||||||
_full_msg(
|
output.write(
|
||||||
start=hook.name,
|
_full_msg(
|
||||||
end_msg=SKIPPED,
|
start=hook.name,
|
||||||
end_color=color.YELLOW,
|
end_msg=SKIPPED,
|
||||||
use_color=use_color,
|
end_color=color.YELLOW,
|
||||||
cols=cols,
|
use_color=use_color,
|
||||||
),
|
cols=cols,
|
||||||
)
|
),
|
||||||
|
)
|
||||||
duration = None
|
duration = None
|
||||||
retcode = 0
|
retcode = 0
|
||||||
files_modified = False
|
files_modified = False
|
||||||
out = b''
|
out = b''
|
||||||
elif not filenames and not hook.always_run:
|
elif not filenames and not hook.always_run:
|
||||||
output.write(
|
if verbose:
|
||||||
_full_msg(
|
output.write(
|
||||||
start=hook.name,
|
_full_msg(
|
||||||
postfix=NO_FILES,
|
start=hook.name,
|
||||||
end_msg=SKIPPED,
|
postfix=NO_FILES,
|
||||||
end_color=color.TURQUOISE,
|
end_msg=SKIPPED,
|
||||||
use_color=use_color,
|
end_color=color.TURQUOISE,
|
||||||
cols=cols,
|
use_color=use_color,
|
||||||
),
|
cols=cols,
|
||||||
)
|
),
|
||||||
|
)
|
||||||
duration = None
|
duration = None
|
||||||
retcode = 0
|
retcode = 0
|
||||||
files_modified = False
|
files_modified = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue