Skip to content

Add documentation about prek.toml#1560

Merged
j178 merged 2 commits intoprektomlfrom
prek-toml-doc
Feb 4, 2026
Merged

Add documentation about prek.toml#1560
j178 merged 2 commits intoprektomlfrom
prek-toml-doc

Conversation

@j178
Copy link
Owner

@j178 j178 commented Feb 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 4, 2026 10:34
@j178 j178 added the documentation Improvements or additions to documentation label Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (2e9cd17) to head (0f923df).

Additional details and impacted files
@@              Coverage Diff              @@
##           prektoml    #1560       +/-   ##
=============================================
+ Coverage     77.67%   88.53%   +10.86%     
=============================================
  Files            92       92               
  Lines         18035    18122       +87     
=============================================
+ Hits          14009    16045     +2036     
+ Misses         4026     2077     -1949     

☔ View full report in Codecov by Sentry.
📢 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.

@prek-ci-bot
Copy link

prek-ci-bot bot commented Feb 4, 2026

📦 Cargo Bloat Comparison

Binary size change: +0.00% (23.6 MiB → 23.6 MiB)

Expand for cargo-bloat output

Head Branch Results

 File  .text    Size             Crate Name
 0.3%   0.8% 80.5KiB             prek? <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.3%   0.7% 71.3KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.6% 65.6KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.2%   0.5% 51.2KiB annotate_snippets annotate_snippets::renderer::render::render
 0.2%   0.5% 50.5KiB              prek prek::languages::<impl prek::config::Language>::install::{{closure}}
 0.2%   0.4% 41.8KiB              prek prek::cli::run::run::run::{{closure}}
 0.2%   0.4% 40.7KiB              prek prek::run::{{closure}}
 0.1%   0.3% 31.1KiB             prek? <prek::cli::RunArgs as clap_builder::derive::Args>::augment_args
 0.1%   0.3% 28.4KiB      serde_saphyr saphyr_parser_bw::scanner::Scanner<T>::fetch_more_tokens
 0.1%   0.3% 28.3KiB              prek prek::identify::by_extension::{{closure}}
 0.1%   0.2% 24.9KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::Config>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2% 22.6KiB      serde_saphyr saphyr_parser_bw::scanner::Scanner<T>::fetch_more_tokens
 0.1%   0.2% 22.2KiB              prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 21.2KiB      clap_builder clap_builder::parser::parser::Parser::get_matches_with
 0.1%   0.2% 20.6KiB              prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 20.0KiB   cargo_metadata? <cargo_metadata::_::<impl serde_core::de::Deserialize for cargo_metadata::Package>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2% 19.5KiB              prek prek::archive::unzip::{{closure}}
 0.1%   0.2% 19.5KiB              prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 19.3KiB               std core::ptr::drop_in_place<prek::languages::<impl prek::config::Language>::install::{{closure}}>
 0.1%   0.2% 19.2KiB              prek <prek::languages::ruby::ruby::Ruby as prek::languages::LanguageImpl>::install::{{closure}}
38.3%  91.5%  9.0MiB                   And 20868 smaller methods. Use -n N to show more.
41.8% 100.0%  9.9MiB                   .text section size, the file size is 23.6MiB

Base Branch Results

 File  .text    Size             Crate Name
 0.3%   0.7% 72.0KiB             prek? <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.3%   0.7% 71.3KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.6% 65.6KiB              prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.2%   0.5% 51.2KiB annotate_snippets annotate_snippets::renderer::render::render
 0.2%   0.5% 50.5KiB              prek prek::languages::<impl prek::config::Language>::install::{{closure}}
 0.2%   0.4% 41.4KiB              prek prek::cli::run::run::run::{{closure}}
 0.2%   0.4% 40.3KiB              prek prek::run::{{closure}}
 0.1%   0.3% 31.8KiB             prek? <prek::cli::RunArgs as clap_builder::derive::Args>::augment_args
 0.1%   0.3% 28.4KiB      serde_saphyr saphyr_parser_bw::scanner::Scanner<T>::fetch_more_tokens
 0.1%   0.3% 28.3KiB              prek prek::identify::by_extension::{{closure}}
 0.1%   0.2% 24.8KiB             prek? <prek::config::_::<impl serde_core::de::Deserialize for prek::config::Config>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2% 22.6KiB      serde_saphyr saphyr_parser_bw::scanner::Scanner<T>::fetch_more_tokens
 0.1%   0.2% 22.2KiB              prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 21.2KiB      clap_builder clap_builder::parser::parser::Parser::get_matches_with
 0.1%   0.2% 20.6KiB              prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 20.0KiB   cargo_metadata? <cargo_metadata::_::<impl serde_core::de::Deserialize for cargo_metadata::Package>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2% 19.5KiB              prek prek::archive::unzip::{{closure}}
 0.1%   0.2% 19.4KiB              prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 19.4KiB              prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 19.3KiB               std core::ptr::drop_in_place<prek::languages::<impl prek::config::Language>::install::{{closure}}>
38.3%  91.6%  9.1MiB                   And 20880 smaller methods. Use -n N to show more.
41.8% 100.0%  9.9MiB                   .text section size, the file size is 23.6MiB

Copy link
Contributor

Copilot AI left a comment

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 adds native TOML configuration file support (prek.toml) alongside existing YAML support, provides comprehensive documentation on both formats, adds the prek identify subcommand for debugging file identification, and implements LLM-friendly documentation generation. The PR also includes routine dependency updates.

Changes:

  • Adds prek.toml as a first-class configuration format with full feature parity to YAML configs
  • Implements prek identify subcommand to display file identification tags (supports text and JSON output)
  • Adds llms.txt generation for LLM-friendly documentation consumption

Reviewed changes

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

Show a summary per file
File Description
docs/configuration.md Extensively updated to document both TOML and YAML formats, including format selection guidance, examples, and compatibility notes
docs/cli.md Added documentation for the new prek identify command
docs/prek.schema.json New JSON Schema file for configuration validation (generated)
mkdocs.yml Added llmstxt plugin configuration for LLM-friendly docs
mise.toml Updated doc build tasks to separate preview and build, added llmstxt generation
docs/requirements.txt Added llmstxt-standalone dependency
crates/prek-consts/src/lib.rs Added constants for config filenames with precedence order
crates/prek/src/config.rs Added TOML parsing support based on file extension
crates/prek/src/workspace.rs Updated config discovery to check multiple filenames with precedence
crates/prek/src/cli/sample_config.rs Added --format flag to generate TOML or YAML samples
crates/prek/src/cli/auto_update.rs Implemented TOML config updating with comment preservation
crates/prek/src/cli/try_repo.rs Changed to generate prek.toml instead of YAML
crates/prek/src/cli/identify.rs New command implementation for file identification
crates/prek/src/cli/mod.rs Added identify command and format enum
crates/prek/Cargo.toml Added toml_edit dependency
Test files Updated constant references and added TOML-specific tests
.pre-commit-config.yaml Updated typos and mdformat-mkdocs versions
.github/workflows/*.yml Updated dependency versions and action references

@j178 j178 merged commit f7a7700 into prektoml Feb 4, 2026
17 checks passed
@j178 j178 deleted the prek-toml-doc branch February 4, 2026 11:34
j178 added a commit that referenced this pull request Feb 4, 2026
j178 added a commit that referenced this pull request Feb 5, 2026
j178 added a commit that referenced this pull request Feb 5, 2026
@j178 j178 mentioned this pull request Feb 6, 2026
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants