docs(shared): add the missing language-switcher row to the CIBG gap register (RB-32)
The register at libs/shared/docs/cibg-gaps.mdx had 8 rows for 9 CIBG-GAP EXTENSION markers in code. language-switcher carries a well-formed marker with no matching row, exactly as ADR-C-008 and adr-c-007.md's handoff note flag. Add the row from the component's own marker comment. Also add a small guard to check-tokens.sh (folded into check:tokens, as ADR-C-008 suggests as an optional step): it diffs the marker set in code against the register's rows and fails CI on drift. Verified working with a scratch marker file before removing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,3 +18,17 @@ if [ -n "$hits" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo 'OK: no hardcoded colours in components'
|
||||
|
||||
# ADR-C-008 guard: every `// CIBG-GAP EXTENSION:` marker (ADR-0003 §Consequences)
|
||||
# must have a row in the register, so the table cannot drift from the code
|
||||
# again without CI catching it.
|
||||
gap_register='libs/shared/docs/cibg-gaps.mdx'
|
||||
markers=$(grep -rl 'CIBG-GAP EXTENSION' apps libs --include='*.component.ts' | xargs -n1 dirname | xargs -n1 basename | sort -u)
|
||||
rows=$(grep -oP '^\| `\K[^`]+' "$gap_register" | sort -u)
|
||||
missing=$(comm -23 <(echo "$markers") <(echo "$rows"))
|
||||
if [ -n "$missing" ]; then
|
||||
echo "$missing"
|
||||
echo "FAIL: CIBG-GAP EXTENSION marker(s) with no row in $gap_register"
|
||||
exit 1
|
||||
fi
|
||||
echo 'OK: every CIBG-GAP EXTENSION marker has a cibg-gaps.mdx row'
|
||||
|
||||
Reference in New Issue
Block a user