Files
sporel-lib-core.input/.githooks/pre-commit
Axel Meyer 8f4128ee34 docs: migrate README to API-Doc-Convention (S2 Phase 3)
Restructured per spec section 3.2: Abstract + Badges-Table + Topology-Block
+ 7 H3-API-Subsections + Conventions + Consumer pattern + Migration +
CHANGELOG + References. Topology-Block auto-populated via
Sporel.exe --lint --fix. Pre-commit hook installed via --install-hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 14:17:44 +02:00

14 lines
389 B
Bash

#!/bin/sh
# Sporel API-Doc-Convention pre-commit hook.
SPOREL_EXE="${SPOREL_EXE:-$(command -v Sporel.exe 2>/dev/null || command -v sporel 2>/dev/null)}"
if [ -z "$SPOREL_EXE" ]; then
echo "INFO: Sporel.exe not on PATH. Skipping lint." >&2
exit 0
fi
"$SPOREL_EXE" --lint="$(pwd)" --fix
RC=$?
if git diff --cached --name-only | grep -qx 'README.md'; then
git add README.md
fi
exit $RC