Repository navigation
Replies: 1 comment 5 replies
|
Without |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Without any verbosity level,
prek runalready shows captured hook output only for failed hooks. However, a non-verbose run does not include the additional hook metadata provided by-v/--verbose.The request is for verbosity level 1 to add that metadata while preserving the default failed-hook-only captured output behavior.
Currently,
prek run -vprints nonempty captured output for passed hooks as well as failed hooks. Although--verboseis a counting flag,prek runreceives onlycli.globals.verbose > 0, so-v,-vv, and-vvvhave the same captured hook output behavior.Keep level 1 focused on hook metadata and timing, and reserve captured output from non-failed hooks for level 2 and above.
Requested behavior
-vor--verbose-vv, repeated--verbose, or higherAt level 1,
-v/--verboseshould continue adding the existing metadata for every hook result other than a(no files to check) Skippedresult:Hook ID
Hook alias, when nonempty and different from the hook ID
Hook description, when configured
Execution duration
Captured hook output at level 1 should behave exactly like a normal run without verbosity: show it for failed hooks, but suppress it for
Passed,Dry Run, and other non-failed results.Additional requirements:
verbose: trueas an explicit per-hook override.log_filebehavior.Example
Usage
At level 1, the verbose metadata should be shown for the hooks, but only
captured failure outputshould be printed:$ prek run --all-files -vAt level 2, the same metadata should be shown and both captured outputs should be printed:
$ prek run --all-files -vvImplementation note
Pass the counted verbosity level into the
prek runresult renderer instead of reducing it to a boolean.All reactions