From 067a9d13bf3c4d7127d07ac9a475255712d4d4f2 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Fri, 22 May 2026 09:13:43 +0100 Subject: [PATCH] justfile: Add `--check` to `cargo fmt` Since these are run as checks, the `--check` flag should be run. This ensures that the `pre-commit` and `pre-push` checks fail if there is any formatting. Contributors are expected to have formatting in their IDEs or can run `cargo fmt` if they wish to format the Rust files. --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index a272c087..3a7fb07c 100644 --- a/justfile +++ b/justfile @@ -36,7 +36,7 @@ pre-commit: check-conflict-markers format-rust check-rust check-docs check-typos [parallel] format-rust: (verify-tool "cargo") @echo "{{CHECK}}Cargo fmt...{{NORMAL}}" - @{{cargo_cmd}} fmt --all + @{{cargo_cmd}} fmt --all --check # Run cargo check [group('pre-commit')]