diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2813cbc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +# Pre-commit configuration for Tangled workspace +# Uses local hooks to avoid network fetches and to run with system toolchain + +repos: + - repo: local + hooks: + - id: rustfmt + name: rustfmt (cargo fmt --check) + entry: cargo fmt --all -- --check + language: system + types: [rust] + pass_filenames: false + - id: clippy + name: clippy (cargo clippy -D warnings) + entry: bash -lc 'cargo clippy --all-targets -- -D warnings' + language: system + types: [rust] + pass_filenames: false