chore: add pre-commit hook to forbid committing root-level Go binaries

This commit is contained in:
mats committed 2026-07-25 16:39:30 +02:00
1 parent a53aba8b43
commit de2c822657
2 files changed
+61

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
# ━━━ Pre-commit hook (forbid root binaries) ━━━
.PHONY: install-hooks
install-hooks:
@if [ "$$(git config core.hooksPath 2>/dev/null)" != "hooks/" ]; then \
git config core.hooksPath hooks/; \
echo "Configured git core.hooksPath=hooks/"; \
fi
@chmod +x hooks/pre-commit
@echo "Pre-commit hook installed. (Bypass with: git commit --no-verify)"