check-issue-refs.sh: scan .ini files too; drop tracker tags from .vale.ini

.vale.ini's own comments named the issues that gated
write-good.Passive, but the tracker-tag lint's extension list didn't
cover .ini, so it never caught its own violation. Extend the scope
and reword the comment to prose that stands on its own.
This commit is contained in:
iris 2026-09-20 18:59:46 +02:00
commit 606143cc42
2 changed files with 10 additions and 7 deletions

View file

@ -12,8 +12,11 @@
# required CI job (branch protection) — a hit blocks merge.
#
# Scope: every tracked `*.rs *.nix *.js *.mjs *.ts *.tsx *.css *.html *.md
# *.yml *.yaml`. CI workflow files (`.forgejo/workflows/*.yml`) are explicitly in
# scope: a step comment is still a comment. The pattern matches a hash,
# *.yml *.yaml *.ini`. CI workflow files (`.forgejo/workflows/*.yml`) are explicitly in
# scope: a step comment is still a comment. `.ini` covers `.vale.ini`, whose
# own inline comments are exactly the kind of prose this lint polices
# elsewhere — added after a `.vale.ini` comment named a tracker issue and
# nothing scanned the file to catch it. The pattern matches a hash,
# 2-5 digits, then a non-alphanumeric char or end-of-line (skips
# letter-bearing hex colours and digit-runs-then-letter, e.g. `#24h`;
# residual: a pure-numeric short hex trips it, write the six-digit form to
@ -32,7 +35,7 @@ pattern='#[0-9]{2,5}([^0-9a-zA-Z]|$)|/issues/[0-9]+([^0-9a-zA-Z]|$)'
# one file — mirrors the assertion in scripts/check-doc-refs.sh. If a rename
# or extension-list edit silences `git ls-files` here, that is a failure of
# this script, not a property of the tree.
file_count="$(git ls-files '*.rs' '*.nix' '*.js' '*.mjs' '*.ts' '*.tsx' '*.css' '*.html' '*.md' '*.yml' '*.yaml' | wc -l)"
file_count="$(git ls-files '*.rs' '*.nix' '*.js' '*.mjs' '*.ts' '*.tsx' '*.css' '*.html' '*.md' '*.yml' '*.yaml' '*.ini' | wc -l)"
if [ "$file_count" -eq 0 ]; then
echo 'check-issue-refs: file-list search matched nothing — pattern or tree changed' >&2
exit 1
@ -50,7 +53,7 @@ fi
# capture the status, then branch on it explicitly rather than erasing it.
if matches="$(
git grep -nE "$pattern" -- '*.rs' '*.nix' '*.js' '*.mjs' '*.ts' '*.tsx' '*.css' '*.html' '*.md' \
'*.yml' '*.yaml'
'*.yml' '*.yaml' '*.ini'
)"; then
grep_status=0
else