portfolio-optimiser-commons/scripts
Kjell Tore Guttormsen 6c4e863608
test(scripts): term-list hygiene check, term list kept outside the tree
Adds scripts/check-excluded-topics.py: scans every tracked path and text
file case-insensitively against a term pattern and fails on any hit. The
term list is read from <git-common-dir>/info/excluded-topics, which git
never tracks and a clone does not carry; without it the check prints
SKIPPED and exits 3. A self-test proves the pattern can find before a
clean scan is ever reported (exit 2 otherwise).

Red on this commit: exit 1, 180 hits in 20 files, 68 tracked paths.
Without the term list: exit 3, SKIPPED.

Valgt git-katalogens info/ (ikke en gitignored fil i arbeidstreet) fordi
den deles av alle worktrees i klonen, overlever at en worktree slettes og
ikke kan spores ved et uhell. Valgt exit 3 for manglende liste fordi et
søk uten mønster ikke har målt noe og ikke skal lese som grønt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 15:11:39 +02:00
..
check-excluded-topics.py test(scripts): term-list hygiene check, term list kept outside the tree 2026-09-23 15:11:39 +02:00