repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: detect-private-key
- id: check-merge-conflict
args: ['--assume-in-merge']
- id: no-commit-to-branch
args: ['--branch', 'main', '--branch', 'master']
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [--baseline, .secrets.baseline]
exclude: '^Cargo\.lock$'
- repo: local
hooks:
- id: cargo-fmt
name: Format Rust code
description: Run rustfmt on Rust files (workspace only)
entry: cargo fmt -- --check
language: system
types: [rust]
pass_filenames: false
- id: cargo-check
name: cargo check
entry: cargo check --all-features --workspace
language: system
types: [rust]
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --all-targets --all-features --workspace -- -D warnings
language: system
types: [rust]
pass_filenames: false
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"