-
Notifications
You must be signed in to change notification settings - Fork 0
ci: bootstrap .pre-commit-config.yaml (audit #219) #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # See https://pre-commit.com for hooks list + config docs | ||
| repos: | ||
| # Basic text/file hygiene | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-yaml | ||
| args: [--allow-multiple-documents] | ||
| - id: check-json | ||
| - id: check-toml | ||
| - id: check-added-large-files | ||
| args: [--maxkb=1000] | ||
| - id: check-merge-conflict | ||
| - id: detect-private-key | ||
| - id: mixed-line-ending | ||
| args: [--fix=lf] | ||
|
|
||
| # Commit message convention | ||
| - repo: https://github.com/compilerla/conventional-pre-commit | ||
| rev: v3.6.0 | ||
| hooks: | ||
| - id: conventional-pre-commit | ||
| stages: [commit-msg] | ||
| args: [] | ||
|
|
||
| # Secret scanning | ||
| - repo: https://github.com/trufflesecurity/trufflehog | ||
| rev: v3.88.40 | ||
| hooks: | ||
| - id: trufflehog | ||
| name: trufflehog (secret scan) | ||
| entry: trufflehog filesystem --no-update --only-verified --fail . | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated
|
||
| language: system | ||
| pass_filenames: false | ||
|
|
||
| # Rust toolchain | ||
| - repo: local | ||
| hooks: | ||
| - id: cargo-fmt | ||
| name: cargo fmt --check | ||
| entry: cargo fmt --all -- --check | ||
| language: system | ||
| types: [rust] | ||
| pass_filenames: false | ||
| - id: cargo-clippy | ||
| name: cargo clippy -D warnings | ||
| entry: cargo clippy --all-targets --all-features -- -D warnings | ||
| language: system | ||
| types: [rust] | ||
| pass_filenames: false | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Architect Review — HIGH
The Conventional Commits rule is configured for the
commit-msgstage, but.pre-commit-config.yamldoes not setdefault_install_hook_types(and the repo has no documentedpre-commit install --hook-type commit-msgflow), so a normalpre-commit installwill not install thecommit-msghook and commit-message enforcement will silently not run.Suggestion: Add a top-level
default_install_hook_typesincludingcommit-msg(or document/install viapre-commit install --hook-type commit-msg) so the Conventional Commits check is actually installed and enforced in standard local workflows.Fix in Cursor | Fix in VSCode Claude
(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖