Browse Source

add git pre commit hook

xenua 2 years ago
parent
commit
5fd2ecf28e
  1. 10
      githooks/pre-commit

10
githooks/pre-commit

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
#!/bin/sh
# pre-commit hook
# check formatting
if ! cargo fmt --check --quiet ; then
echo "error: run cargo fmt before committing"
exit 1
else
echo "cargo fmt checked successfully"
fi
Loading…
Cancel
Save