Skip to content

Commit 75f3886

Browse files
committed
Add cargo fmt to pre-commit githook
To save devs getting frustrated by CI; add a call to `cargo +nightly fmt` to our git pre-commit hook.
1 parent 0516dde commit 75f3886

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

githooks/pre-commit

+3
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ git diff-index --check --cached $against -- || exit 1
4848

4949
# Check that code lints cleanly.
5050
cargo clippy --features=rand-std,recovery,lowmemory,global-context --all-targets -- -D warnings || exit 1
51+
52+
# Check that there are no formatting issues.
53+
cargo +nightly fmt --check || exit 1

0 commit comments

Comments
 (0)