From db6fb61f22c420a7d2dcb2edb2c27b86e047503d Mon Sep 17 00:00:00 2001 From: Edo Mangelaars Date: Thu, 25 Jul 2024 14:36:17 +0200 Subject: [PATCH 1/2] Add nightly rustfmt hook --- .pre-commit-hooks.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 0ffe38d..8052960 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -5,6 +5,13 @@ language: system types: [rust] args: ["--"] +- id: fmt-nightly + name: fmt-nightly + description: Format files with cargo fmt using nightly rustfmt. + entry: cargo +nightly fmt + language: system + types: [rust] + args: ["--"] - id: cargo-check name: cargo check description: Check the package for errors. From bf00a1c4eafda54b46ea4e975967eff0e55272d0 Mon Sep 17 00:00:00 2001 From: Edo Mangelaars Date: Thu, 25 Jul 2024 14:36:40 +0200 Subject: [PATCH 2/2] Remove unused (I think) hooks.yaml --- hooks.yaml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 hooks.yaml diff --git a/hooks.yaml b/hooks.yaml deleted file mode 100644 index 8c60d0d..0000000 --- a/hooks.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- id: fmt - name: fmt - description: Format files with cargo fmt. - entry: cargo fmt -- - language: system - files: \.rs$ - args: [] -- id: cargo-check - name: cargo check - description: Check the package for errors. - entry: cargo check - language: system - files: \.rs$ - pass_filenames: false -- id: cargo-clippy - name: cargo clippy - description: Run the Clippy linter on the package. - entry: cargo clippy -- -D warnings - language: system - files: \.rs$ - pass_filenames: false