From d046231d00431e211e68830e813a19c9f0c530cf Mon Sep 17 00:00:00 2001 From: Cam Proudlock Date: Fri, 17 Jul 2026 15:08:51 -0400 Subject: [PATCH] Dev setup: correct the hook claim, ship an opt-in committed hook The naming check was documented as an auto-running pre-commit hook, but .git/hooks is never cloned - a fresh clone had nothing and CI is the real enforcement. Ship .githooks/pre-commit for opt-in local use. --- .gitattributes | 1 + .githooks/pre-commit | 5 +++++ 2 files changed, 6 insertions(+) create mode 100755 .githooks/pre-commit diff --git a/.gitattributes b/.gitattributes index 2be6e2e4..e03d96cd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,4 @@ # Shell scripts must stay LF so Git Bash on Windows can run them *.sh text eol=lf scripts/check-naming-and-style.sh text eol=lf +.githooks/pre-commit text eol=lf diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 00000000..e395c9b9 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Committed pre-commit hook. Activate per clone with: +# git config core.hooksPath .githooks +# Runs the naming/style gate; blocks the commit on failure. +exec bash "$(git rev-parse --show-toplevel)/scripts/check-naming-and-style.sh"