The three issues all point to the same problem: per-hook output is useful, but the current reporting is too rigid.
Issue #1240 asks for visibility into hooks skipped by --skip, SKIP, or PREK_SKIP, because those hooks are intentionally excluded and users still want that decision reflected in the run output.
Issue #1468 asks for the opposite in another case: hide (no files to check)Skipped lines because they add noise, especially in large repos and scoped runs.
Issue #1537 generalizes the same concern further: many successful hooks are low-signal and should be hidden unless they fail, while still allowing a fuller view during debugging or CI.
Instead of adding separate flags like --hide-skipped, --show-skipped, or per-hook hiding toggles, add one new prek run flag:
--report-level <level>
Levels, from least to most verbose:
-
silent
Show no per-hook status lines.
-
fail
Show only failed hooks.
-
skipped-no-files
Show failed hooks, plus hooks skipped because there were no files to check.
-
skipped
Show failed hooks, plus hooks skipped because there were no files to check, plus hooks skipped by --skip, SKIP, or PREK_SKIP.
-
passed
Show failed hooks, skipped hooks, and passed hooks.
-
all
Show every hook status and any other report-only states.
Behavior: hook statuses below the selected level are not displayed. Hook execution, exit codes, and failure semantics do not change; this is only an output filter.
This unifies all three requests into one model:
#1240 is covered by --report-level skipped or higher.
#1468 is covered by --report-level fail.
#1537 is covered by --report-level fail for minimal output, or passed when full normal output is desired.
Suggested default: passed, to stay close to current behavior while making the reporting model explicit and extensible.
The three issues all point to the same problem: per-hook output is useful, but the current reporting is too rigid.
Issue #1240 asks for visibility into hooks skipped by
--skip,SKIP, orPREK_SKIP, because those hooks are intentionally excluded and users still want that decision reflected in the run output.Issue #1468 asks for the opposite in another case: hide
(no files to check)Skippedlines because they add noise, especially in large repos and scoped runs.Issue #1537 generalizes the same concern further: many successful hooks are low-signal and should be hidden unless they fail, while still allowing a fuller view during debugging or CI.
Instead of adding separate flags like
--hide-skipped,--show-skipped, or per-hook hiding toggles, add one newprek runflag:--report-level <level>Levels, from least to most verbose:
silentShow no per-hook status lines.
failShow only failed hooks.
skipped-no-filesShow failed hooks, plus hooks skipped because there were no files to check.
skippedShow failed hooks, plus hooks skipped because there were no files to check, plus hooks skipped by
--skip,SKIP, orPREK_SKIP.passedShow failed hooks, skipped hooks, and passed hooks.
allShow every hook status and any other report-only states.
Behavior: hook statuses below the selected level are not displayed. Hook execution, exit codes, and failure semantics do not change; this is only an output filter.
This unifies all three requests into one model:
#1240 is covered by
--report-level skippedor higher.#1468 is covered by
--report-level fail.#1537 is covered by
--report-level failfor minimal output, or passed when full normal output is desired.Suggested default:
passed, to stay close to current behavior while making the reporting model explicit and extensible.