From ea217eaea11243796c8ff85a43fe01245cc125a5 Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 9 Sep 2024 14:24:38 +0800 Subject: [PATCH] [meta] Update pre-commit config Directly invoke cargo using nix develop to avoid using the system cargo. --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93e79c876..1d37807c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,17 +8,17 @@ repos: hooks: - id: nac3-cargo-fmt name: nac3 cargo format - entry: cargo + entry: nix language: system types: [file, rust] pass_filenames: false description: Runs cargo fmt on the codebase. - args: [fmt] + args: [develop, -c, cargo, fmt, --all] - id: nac3-cargo-clippy name: nac3 cargo clippy - entry: cargo + entry: nix language: system types: [file, rust] pass_filenames: false description: Runs cargo clippy on the codebase. - args: [clippy, --tests] + args: [develop, -c, cargo, clippy, --tests]