summaryrefslogtreecommitdiff
path: root/git-hooks/pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'git-hooks/pre-commit')
-rwxr-xr-xgit-hooks/pre-commit10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
new file mode 100755
index 0000000..98f1c37
--- /dev/null
+++ b/git-hooks/pre-commit
@@ -0,0 +1,10 @@
+#!/bin/bash -e
+
+# Don't put anything here that routinely takes longer than a second or so to
+# run. It gets old fast. That's why this uses `cargo check` and not `cargo
+# test`, for example.
+
+# Make sure there are no screamers in the code.
+cargo check
+# Make sure the prepared statement data in .sqlx is up to date.
+cargo sqlx prepare --check