From c5004ad8f62ab686f4eea6590d48c67b897301f3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 29 Mar 2025 09:43:05 +0100 Subject: [PATCH] add precommit (copy of coreutils) --- .pre-commit-config.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9d5cad8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +repos: +- repo: local + hooks: + - id: rust-linting + name: Rust linting + description: Run cargo fmt on files included in the commit. + entry: cargo +stable fmt -- + pass_filenames: true + types: [file, rust] + language: system + - id: rust-clippy + name: Rust clippy + description: Run cargo clippy on files included in the commit. + entry: cargo +stable clippy --workspace --all-targets --all-features -- + pass_filenames: false + types: [file, rust] + language: system