Repository navigation
Replies: 1 comment
|
Can also be: |
0 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.
Summary
Following discussion #2578 and discussion #2646, propose a configuration option for suppressing captured output from successful hooks without introducing another CLI flag.
Add
hide_captured_outputwith the following properties:false, preserving existing behavior.fail_fast.Behavior
verbose: true. At verbosity level 1 or higher, captured output is displayed. Settinghide_captured_output: truesuppresses it regardless of CLI verbosity or the hook'sverbosesetting.Hook statuses, metadata, execution, exit codes, logging, and existing verbosity semantics remain unchanged.
Motivation
I want to use
prek run -vto display basic metadata for every hook, including successful hooks, without printing their potentially lengthy captured output.The metadata I want to retain includes:
Currently, the verbosity settings do not allow this combination:
-v: Successful hooks generally do not display their captured output, but their detailed metadata is also hidden.-vor higher: The metadata is displayed, but so is the captured output from successful hooks, which can add significant noise.The missing capability is to display verbose metadata for all hooks while showing captured output only for failed hooks.
Setting
hide_captured_output: truewould provide exactly this behavior, preserving useful metadata and failure diagnostics without unnecessary output from successful hooks.Usage
Here, captured output is suppressed globally for successful hooks but remains enabled for
example-check.To restore default reporting behavior:
hide_captured_output: false(the default).--no-hide_captured_outputto override configured values, including hook-level settings.Support the configuration option in both YAML and TOML.
References
All reactions