# Pre-commit hooks configuration # See https://pre-commit.com for more information repos: # General file checks - 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 - id: check-toml - id: check-merge-conflict - id: check-added-large-files args: ['--maxkb=1000'] - id: mixed-line-ending # Rust formatting - repo: https://github.com/doublify/pre-commit-rust rev: v1.0 hooks: - id: fmt name: cargo fmt description: Format Rust code with rustfmt - id: cargo-check name: cargo check description: Check Rust code compilation - id: clippy name: cargo clippy description: Lint Rust code with clippy args: ['--all-features', '--', '-D', 'warnings'] # Optional: run on all files when config changes default_install_hook_types: [pre-commit, pre-push]