PureXML/third_party/rules-swift/.githooks/commit-msg
Mihaela Mihaljevic c7ef8abfd9 chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror
Adopt the rules-swift pin-and-codify strategy in snapshot mode (third_party/rules-swift
@97dc70f + sha256), add codified gates, a conformance audit ledger, and
.github/workflows/rules-swift.yml (corpus-pin integrity required, full gate report mode).
Remove the docs/rules mirror it supersedes (repo-specific files kept under docs/). Style
and leak gates exclude the vendored corpus.
2026-06-30 14:02:40 +02:00

19 lines
763 B
Bash
Executable File

#!/bin/sh
# commit-msg hook: reject AI/tool attribution and em dashes in the message.
# Install per clone (hooks are not cloned): git config core.hooksPath .githooks
# See core/commits.md and core/git-discipline.md.
msg_file="$1"
if grep -qiE 'co-authored-by:[[:space:]]*(claude|cursor|copilot|codex|gpt|gemini|antigravity)|generated (with|by) (claude|cursor|copilot|codex|gpt|gemini|antigravity)|generated with .*code|powered by|robot' "$msg_file"; then
echo "commit-msg: remove tool attribution (co-author trailer, 'generated with', 'powered by', robot emoji)." >&2
exit 1
fi
if grep -q "$(printf '\xe2\x80\x94')" "$msg_file"; then
echo "commit-msg: no em dashes in commit messages; use commas, colons, or restructure." >&2
exit 1
fi
exit 0