chore: run composer check on pre-commit
This commit is contained in:
1 parent
93914a2b38
commit
fb6ac985fe
1 file changed
+19
@@ -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."
|
||||||
Reference in new issue
Block a user