From fb6ac985feb09756795a263fbaf0f7913c0c7a21 Mon Sep 17 00:00:00 2001 From: Dario Garcia Date: Sun, 15 Nov 2026 11:07:55 -0300 Subject: [PATCH] chore: run composer check on pre-commit --- .githooks/pre-commit | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100644 index 0000000..b44bef6 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Runs the full gate before every commit. Enable it once per clone with: +# git config core.hooksPath .githooks +# +# Skip it for a single commit with: +# git commit --no-verify + +set -e + +echo "pre-commit: running composer check..." + +if ! composer check; then + echo "" + echo "pre-commit: composer check failed. Fix it, or use 'git commit --no-verify' to bypass." >&2 + exit 1 +fi + +echo "pre-commit: gate passed."