Skip to content

Commit 2fa4fc5

Browse files
committed
Add formatter to git pre-commit hook
We check formatting in CI so add it to the pre-commit git hook.
1 parent 7a629c6 commit 2fa4fc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

githooks/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ git diff-index --check --cached $against -- || exit 1
4747

4848
# Check that code lints cleanly.
4949
cargo clippy --all-features -- -D warnings || exit 1
50+
51+
# Check that there are no formatting issues.
52+
cargo +nightly fmt --check || exit 1

0 commit comments

Comments
 (0)