PureXML/scripts/install-hooks.sh
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

22 lines
644 B
Bash
Executable File

#!/bin/sh
# Install and verify tracked git hooks for this clone.
set -eu
ROOT=$(cd "$(dirname "$0")/.." && pwd)
cd "$ROOT"
git config core.hooksPath .githooks
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
# Plant a message the commit-msg hook MUST reject: an em dash (U+2014), which every
# commit-msg variant in this repo family rejects under github-discipline Rule 5.2.
printf 'test\n\nbad em dash \342\200\224 here\n' > "$tmp"
if .githooks/commit-msg "$tmp" >/dev/null 2>&1; then
echo "install-hooks: commit-msg hook did not reject the planted style violation." >&2
exit 1
fi
echo "hooks installed: $(git config --get core.hooksPath)"