Skip to content

Print hook description on failure with --verbose#2353

Open
GhostofGoes wants to merge 2 commits into
j178:masterfrom
GhostofGoes:agents/enable-hook-description-verbose-logging
Open

Print hook description on failure with --verbose#2353
GhostofGoes wants to merge 2 commits into
j178:masterfrom
GhostofGoes:agents/enable-hook-description-verbose-logging

Conversation

@GhostofGoes

Copy link
Copy Markdown

Summary

When --verbose (or the new PREK_VERBOSE environment variable) is enabled and a hook fails, prek now prints the hook's description field alongside the existing hook id/duration/exit code details. The goal is to help users understand why a hook failed without needing to dig through prek.toml/.pre-commit-config.yaml. This is opt-in, but could become default behavior in the future.

The PREK_VERBOSE env var lets this work for hooks triggered via Git (e.g. git commit) too, since Git has no way to forward CLI flags like --verbose to the installed hook shim.

Changes

  • crates/prek/src/cli/run/run.rs: print - description: ... after - hook id: ... when a hook fails and verbose mode (global --verbose/-v or per-hook verbose: true) is active.
  • crates/prek-consts/src/env_vars.rs: added PREK_VERBOSE env var, mirroring the existing PREK_QUIET.
  • crates/prek/src/cli/mod.rs: wired env = EnvVars::PREK_VERBOSE onto the --verbose arg and updated its help text.
  • crates/prek/src/cli/hook_impl.rs / crates/prek/src/main.rs: threaded verbose through hook-impl so hooks invoked by Git shims respect it.
  • crates/prek/src/config.rs: updated the description field doc comment to mention it's now surfaced on failure.
  • Docs: docs/usage.md, docs/authoring-hooks.md, docs/reference/configuration.md, docs/reference/cli.md (regenerated), and prek.schema.json (regenerated).

Tests

  • crates/prek/tests/run.rs: verbose_prints_hook_description_on_failure and prek_verbose_env_var_prints_hook_description_on_failure.
  • crates/prek/tests/hook_impl.rs: hook_impl_verbose_env_var_prints_hook_description, exercising the Git-hook (git commit) path end-to-end.

cargo fmt --check and cargo clippy --all-targets are clean, and the full run/hook_impl integration test suites pass locally.

@GhostofGoes
GhostofGoes marked this pull request as ready for review July 15, 2026 20:38
@GhostofGoes
GhostofGoes requested a review from j178 as a code owner July 15, 2026 20:38
Copilot AI review requested due to automatic review settings July 15, 2026 20:38
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.47%. Comparing base (b45e671) to head (eac7c63).

Files with missing lines Patch % Lines
crates/prek/src/cli/run/run.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2353      +/-   ##
==========================================
- Coverage   93.33%   88.47%   -4.86%     
==========================================
  Files         128      128              
  Lines       27262    27272      +10     
==========================================
- Hits        25446    24130    -1316     
- Misses       1816     3142    +1326     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends prek’s verbose mode so that, when a hook fails, prek prints the hook’s configured description alongside the existing failure details. It also adds a PREK_VERBOSE environment variable to enable the same behavior for Git-triggered hooks (e.g., git commit), where CLI flags can’t be forwarded to the hook shim.

Changes:

  • Print - description: ... on hook failure when verbose mode is enabled (CLI --verbose/-v, per-hook verbosity, or via PREK_VERBOSE for Git hook shims).
  • Add PREK_VERBOSE env var support and thread verbose through the hook-impl execution path.
  • Update schema/docs and add integration tests covering both prek run and Git-hook (hook-impl) paths.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/prek/src/cli/run/run.rs Prints hook description in the failure detail block when verbose mode is enabled.
crates/prek-consts/src/env_vars.rs Adds PREK_VERBOSE environment variable constant.
crates/prek/src/cli/mod.rs Wires PREK_VERBOSE into the global --verbose flag and updates help text.
crates/prek/src/cli/hook_impl.rs Threads a verbose boolean into hook-impl and passes it through to cli::run.
crates/prek/src/main.rs Passes global verbose state into the hook-impl command handler.
crates/prek/src/config.rs Updates the description field doc comment to reflect new surfaced behavior.
crates/prek/tests/run.rs Adds integration tests for description printing with --verbose and PREK_VERBOSE.
crates/prek/tests/hook_impl.rs Adds an end-to-end Git hook path test verifying PREK_VERBOSE behavior.
docs/usage.md Documents using --verbose / PREK_VERBOSE to see hook descriptions on failure.
docs/authoring-hooks.md Notes that description can be printed on failure when verbose is enabled.
docs/reference/configuration.md Documents description printing behavior for verbose mode.
docs/reference/cli.md Regenerated CLI reference reflecting updated --verbose help text and env var.
prek.schema.json Regenerated schema: updates description field documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@prek-ci-bot

prek-ci-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

📦 Cargo Bloat Comparison

Binary size change: -0.68% (29.2 MiB → 29.0 MiB)

Expand for cargo-bloat output

Head Branch Results

 File  .text     Size             Crate Name
 1.1%   2.3% 332.0KiB        aws_lc_sys aws_lc_0_42_0_aes_gcm_encrypt_avx512
 1.1%   2.3% 332.0KiB        aws_lc_sys aws_lc_0_42_0_aes_gcm_decrypt_avx512
 0.3%   0.6%  79.0KiB              prek <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.2%   0.4%  53.5KiB              prek prek::run::{closure#0}
 0.2%   0.4%  52.4KiB              prek <<prek::config::Config as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.2%   0.3%  49.4KiB annotate_snippets annotate_snippets::renderer::render::render
 0.1%   0.3%  41.3KiB              prek prek::cli::run::run::run::{closure#0}
 0.1%   0.2%  33.4KiB              prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
 0.1%   0.2%  31.9KiB              prek <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
 0.1%   0.2%  30.1KiB     granit_parser <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
 0.1%   0.2%  28.6KiB    cargo_metadata <&mut serde_json::de::Deserializer<serde_json::read::StrRead> as serde_core::de::Deserializer>::deserialize_struct::<<cargo_metadata::Package as serde_core::de::Deserialize>::deserialize::__Visitor>
 0.1%   0.2%  28.3KiB              prek <<prek::config::RemoteHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  28.0KiB        aws_lc_sys aws_lc_0_42_0_edwards25519_scalarmuldouble_alt
 0.1%   0.2%  27.5KiB        aws_lc_sys aws_lc_0_42_0_edwards25519_scalarmuldouble
 0.1%   0.2%  26.1KiB              prek prek::cli::try_repo::try_repo::{closure#0}
 0.1%   0.2%  25.6KiB              prek <<prek::config::LocalHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  25.2KiB              prek <<prek::config::UpdateOptions as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  24.9KiB               xml <xml::reader::parser::PullParser>::dispatch_token
 0.1%   0.2%  24.3KiB              prek <prek::languages::node::installer::NodeInstaller>::install::{closure#0}
 0.1%   0.2%  24.0KiB     granit_parser <granit_parser::scanner::Scanner<serde_saphyr::de::buffered_input::ReaderInput>>::fetch_more_tokens
42.0%  88.0%  12.2MiB                   And 25684 smaller methods. Use -n N to show more.
47.7% 100.0%  13.8MiB                   .text section size, the file size is 29.0MiB

Base Branch Results

 File  .text     Size             Crate Name
 1.1%   2.3% 332.0KiB        aws_lc_sys aws_lc_0_42_0_aes_gcm_encrypt_avx512
 1.1%   2.3% 332.0KiB        aws_lc_sys aws_lc_0_42_0_aes_gcm_decrypt_avx512
 0.3%   0.6%  79.0KiB              prek <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.2%   0.4%  53.4KiB              prek prek::run::{closure#0}
 0.2%   0.4%  52.0KiB              prek <<prek::config::Config as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.2%   0.3%  49.4KiB annotate_snippets annotate_snippets::renderer::render::render
 0.1%   0.3%  41.2KiB              prek prek::cli::run::run::run::{closure#0}
 0.1%   0.2%  33.4KiB              prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
 0.1%   0.2%  31.9KiB              prek <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
 0.1%   0.2%  30.1KiB     granit_parser <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
 0.1%   0.2%  28.6KiB    cargo_metadata <&mut serde_json::de::Deserializer<serde_json::read::StrRead> as serde_core::de::Deserializer>::deserialize_struct::<<cargo_metadata::Package as serde_core::de::Deserialize>::deserialize::__Visitor>
 0.1%   0.2%  28.0KiB        aws_lc_sys aws_lc_0_42_0_edwards25519_scalarmuldouble_alt
 0.1%   0.2%  27.9KiB              prek <<prek::config::RemoteHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  27.5KiB        aws_lc_sys aws_lc_0_42_0_edwards25519_scalarmuldouble
 0.1%   0.2%  26.1KiB              prek prek::cli::try_repo::try_repo::{closure#0}
 0.1%   0.2%  25.6KiB              prek <<prek::config::LocalHook as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  25.2KiB              prek <<prek::config::UpdateOptions as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<<serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
 0.1%   0.2%  24.9KiB               xml <xml::reader::parser::PullParser>::dispatch_token
 0.1%   0.2%  24.3KiB              prek <prek::languages::node::installer::NodeInstaller>::install::{closure#0}
 0.1%   0.2%  24.0KiB     granit_parser <granit_parser::scanner::Scanner<serde_saphyr::de::buffered_input::ReaderInput>>::fetch_more_tokens
42.2%  88.1%  12.3MiB                   And 25758 smaller methods. Use -n N to show more.
47.9% 100.0%  14.0MiB                   .text section size, the file size is 29.2MiB

@prek-ci-bot

prek-ci-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

⚡️ Hyperfine Benchmarks

Summary: 1 regressions, 0 improvements above the 10% threshold.

Environment
  • OS: Linux 6.17.0-1020-azure
  • CPU: 4 cores
  • prek version: prek 0.4.10+3 (d5db5c3 2026-07-16)
  • Rust version: rustc 1.97.1 (8bab26f4f 2026-07-14)
  • Hyperfine version: hyperfine 1.20.0
CLI Commands

Benchmarking basic commands in the main repo:

prek --version

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base --version 2.6 ± 0.1 2.4 3.2 1.08 ± 0.09
prek-head --version 2.4 ± 0.2 2.2 3.1 1.00

prek list

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base list 10.8 ± 0.3 10.1 11.6 1.02 ± 0.05
prek-head list 10.5 ± 0.3 9.9 11.4 1.00

prek validate-config .pre-commit-config.yaml

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base validate-config .pre-commit-config.yaml 4.3 ± 0.2 3.9 4.7 1.07 ± 0.06
prek-head validate-config .pre-commit-config.yaml 4.0 ± 0.2 3.8 4.5 1.00

prek sample-config

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base sample-config 3.2 ± 0.1 3.0 3.6 1.09 ± 0.05
prek-head sample-config 3.0 ± 0.1 2.9 3.2 1.00
Cold vs Warm Runs

Comparing first run (cold) vs subsequent runs (warm cache):

prek run --all-files (cold - no cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 80.3 ± 3.2 75.9 85.7 1.00 ± 0.05
prek-head run --all-files 80.0 ± 2.9 74.4 83.5 1.00

prek run --all-files (warm - with cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 79.9 ± 3.7 73.8 84.6 1.03 ± 0.06
prek-head run --all-files 77.4 ± 3.1 71.4 82.5 1.00
Full Hook Suite

Running the builtin hook suite on the benchmark workspace:

prek run --all-files (full builtin hook suite)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --all-files 78.2 ± 3.2 72.0 85.4 1.01 ± 0.06
prek-head run --all-files 77.4 ± 3.6 71.9 93.8 1.00
Individual Hook Performance

Benchmarking each hook individually on the test repo:

prek run trailing-whitespace --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run trailing-whitespace --all-files 21.3 ± 0.5 20.6 22.5 1.02 ± 0.03
prek-head run trailing-whitespace --all-files 21.0 ± 0.4 20.1 22.2 1.00

prek run end-of-file-fixer --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run end-of-file-fixer --all-files 27.9 ± 2.8 24.3 34.9 1.00
prek-head run end-of-file-fixer --all-files 28.0 ± 2.1 25.1 31.5 1.00 ± 0.13

prek run check-json --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-json --all-files 8.9 ± 0.4 8.4 9.9 1.07 ± 0.05
prek-head run check-json --all-files 8.4 ± 0.2 8.0 8.8 1.00

prek run check-yaml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-yaml --all-files 8.6 ± 1.5 7.9 14.7 1.05 ± 0.19
prek-head run check-yaml --all-files 8.2 ± 0.2 7.8 8.8 1.00

prek run check-toml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-toml --all-files 8.7 ± 0.3 8.2 9.5 1.09 ± 0.05
prek-head run check-toml --all-files 8.0 ± 0.3 7.6 8.4 1.00

prek run check-xml --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-xml --all-files 8.4 ± 0.4 7.8 9.2 1.04 ± 0.06
prek-head run check-xml --all-files 8.1 ± 0.4 7.6 9.0 1.00

prek run detect-private-key --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run detect-private-key --all-files 14.0 ± 1.1 12.1 16.2 1.01 ± 0.11
prek-head run detect-private-key --all-files 14.0 ± 1.0 11.8 15.6 1.00

prek run fix-byte-order-marker --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run fix-byte-order-marker --all-files 19.0 ± 0.7 17.7 20.4 1.00
prek-head run fix-byte-order-marker --all-files 29.4 ± 34.0 17.4 186.7 1.55 ± 1.79

⚠️ Warning: Performance regression for prek run fix-byte-order-marker --all-files: 54.8500% slower

Installation Performance

Benchmarking hook installation (fast path hooks skip Python setup):

prek install-hooks (cold - no cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base install-hooks 5.2 ± 0.1 5.1 5.2 1.05 ± 0.02
prek-head install-hooks 4.9 ± 0.1 4.8 5.0 1.00

prek install-hooks (warm - with cache)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base install-hooks 5.3 ± 0.1 5.1 5.4 1.09 ± 0.03
prek-head install-hooks 4.9 ± 0.1 4.8 4.9 1.00
File Filtering/Scoping Performance

Testing different file selection modes:

prek run (staged files only)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run 40.1 ± 0.8 39.0 42.3 1.00
prek-head run 40.9 ± 2.7 38.9 51.2 1.02 ± 0.07

prek run --files '*.json' (specific file type)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --files '*.json' 9.0 ± 0.1 8.8 9.2 1.02 ± 0.02
prek-head run --files '*.json' 8.7 ± 0.2 8.4 9.1 1.00
Workspace Discovery & Initialization

Benchmarking hook discovery and initialization overhead:

prek run --dry-run --all-files (measures init overhead)

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run --dry-run --all-files 7.8 ± 0.2 7.5 8.5 1.05 ± 0.03
prek-head run --dry-run --all-files 7.5 ± 0.1 7.3 7.8 1.00
Meta Hooks Performance

Benchmarking meta hooks separately:

prek run check-hooks-apply --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-hooks-apply --all-files 13.4 ± 0.2 13.2 13.9 1.06 ± 0.06
prek-head run check-hooks-apply --all-files 12.7 ± 0.7 11.6 13.5 1.00

prek run check-useless-excludes --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run check-useless-excludes --all-files 11.7 ± 0.2 11.5 12.3 1.00
prek-head run check-useless-excludes --all-files 12.2 ± 1.7 11.2 17.6 1.04 ± 0.14

prek run identity --all-files

Command Mean [ms] Min [ms] Max [ms] Relative
prek-base run identity --all-files 11.1 ± 0.2 10.8 11.6 1.01 ± 0.02
prek-head run identity --all-files 10.9 ± 0.1 10.8 11.3 1.00

When --verbose (or the new PREK_VERBOSE env var) is enabled and a hook fails,
prek now prints the hook's `description` field alongside the existing hook id/
duration/exit code details. This helps users understand why a hook failed
without needing to dig through prek.toml/.pre-commit-config.yaml.

The PREK_VERBOSE env var lets this work for Git-triggered hooks too (e.g.
`PREK_VERBOSE=1 git commit`), since Git can't forward CLI flags to the
installed hook shim.

Adds tests covering both `prek run --verbose` and the PREK_VERBOSE env var
via a real git-hook invocation, and updates docs/reference/cli.md,
docs/reference/configuration.md, docs/authoring-hooks.md, docs/usage.md, and
prek.schema.json accordingly.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings July 16, 2026 19:14
@GhostofGoes
GhostofGoes force-pushed the agents/enable-hook-description-verbose-logging branch from 50c040f to 0aa6052 Compare July 16, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Comment thread crates/prek/src/config.rs Outdated
Comment on lines +1331 to +1333
Free-form description shown in listings / metadata. When `--verbose` (or the `PREK_VERBOSE`
environment variable) is enabled, this description is also printed if the hook fails, to help
explain why the hook exists and what it checks.
Comment thread docs/authoring-hooks.md
| `fail_fast` | No | No | boolean | Stop the run immediately if this hook fails. |
| `pass_filenames` | No | No | boolean or positive integer | Control whether, or how many, matching filenames are passed. |
| `description` | No | No | string | Free-form metadata shown in listings. |
| `description` | No | No | string | Free-form metadata shown in listings; printed on failure when `--verbose` is enabled. |
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot AI review requested due to automatic review settings July 16, 2026 19:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Comment on lines +1008 to +1017
if status == RunStatus::Failed
&& (self.verbose || result.hook.verbose)
&& let Some(description) = result.hook.description.as_deref()
{
writeln!(
stdout,
"{detail_prefix}{}",
format!("- description: {description}").dimmed()
)?;
}
Comment thread docs/authoring-hooks.md
| `fail_fast` | No | No | boolean | Stop the run immediately if this hook fails. |
| `pass_filenames` | No | No | boolean or positive integer | Control whether, or how many, matching filenames are passed. |
| `description` | No | No | string | Free-form metadata shown in listings. |
| `description` | No | No | string | Free-form metadata shown in listings; printed on failure when `--verbose` is enabled. |
Comment on lines +1331 to +1333
Free-form description shown in listings / metadata. When `--verbose` (or the `PREK_VERBOSE`
environment variable) is enabled, this description is also printed if the hook fails, to help
explain why the hook exists and what it checks.
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
Comment thread prek.schema.json
},
"description": {
"description": "A description of the hook. For metadata only.",
"description": "A description of the hook, shown in listings and, when `--verbose` is enabled, printed\nif the hook fails to help explain the failure.",
@j178 j178 self-assigned this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants