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"