From 3e96a14d1fde222d5ca141bfeeabb2f5da2cdf67 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 2 Apr 2023 18:52:18 +0200 Subject: [PATCH] add a pre commit configuration - just like 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..f90466b --- /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 +nightly 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 +nightly clippy --workspace --all-targets --all-features -- + pass_filenames: false + types: [file, rust] + language: system