summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/commit-msg6
-rwxr-xr-xhooks/pre-commit6
2 files changed, 12 insertions, 0 deletions
diff --git a/hooks/commit-msg b/hooks/commit-msg
new file mode 100755
index 0000000..6f91fcb
--- /dev/null
+++ b/hooks/commit-msg
@@ -0,0 +1,6 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2023 Matthew Fennell <matthew@fennell.dev>
+#
+# SPDX-License-Identifier: AGPL-3.0-only
+
+gitlint --staged --msg-filename "$1" run-hook
diff --git a/hooks/pre-commit b/hooks/pre-commit
new file mode 100755
index 0000000..102d529
--- /dev/null
+++ b/hooks/pre-commit
@@ -0,0 +1,6 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2023 Matthew Fennell <matthew@fennell.dev>
+#
+# SPDX-License-Identifier: AGPL-3.0-only
+
+make