aboutsummaryrefslogtreecommitdiff
path: root/.githooks
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-04-10 15:09:32 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-04-10 15:09:32 +0300
commitd96962adf6238b8c168df93315b7c8ef784415dd (patch)
tree9ebfbbd8c84d4a42a331dc3e45a393aa8f21b9c4 /.githooks
parentf5282d9ad28af32c11db1e13a485878225fcd9bf (diff)
chore: add pre-commit fmt hook
Diffstat (limited to '.githooks')
-rwxr-xr-x.githooks/pre-commit8
1 files changed, 8 insertions, 0 deletions
diff --git a/.githooks/pre-commit b/.githooks/pre-commit
new file mode 100755
index 00000000..249d41f7
--- /dev/null
+++ b/.githooks/pre-commit
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+repo_root="$(git rev-parse --show-toplevel)"
+cd "$repo_root"
+
+echo "pre-commit: running cargo fmt --check"
+cargo fmt --check