Repository navigation
Commit 540dbc7
authored
fix(ci): the invisible-character gate never matched anything (#189)
**Measured 2026-08-27: this gate caught 0 of 6 invisible-character test
cases.** It has never detected an NBSP, zero-width space, BOM, soft
hyphen, bidi override or word joiner.
## Root cause
The pattern used UTF-8 **byte sequences** (`\xc2\xa0`) while `grep -P`
matches **characters**. Bytes `c2 a0` are *one* character U+00A0;
`\xc2\xa0` asks for *two*, U+00C2 then U+00A0 — never present.
```
grep -P '\xc2\xa0' -> miss
grep -P '\x{a0}' -> MATCH
```
Only `\x00` worked, being single-byte in both readings. The gate ran,
passed, and could not see what it exists to see.
## Fixed
- **codepoint escapes** in place of byte sequences
- **C0 controls** `\x01-\x08,\x0B,\x0C,\x0E-\x1F` added (TAB/LF/CR
excluded)
- **`grep -a`** — without it grep skips any NUL-bearing file as binary
The C0 range matters: a stray **backspace byte** made a workflow
unparseable in `developer-ecosystem`, so it never ran — and this linter
called it clean.
Canonical fix: hyperpolymath/empty-linter#70. **1 file(s)** here.
**Verified:** YAML re-parsed, and the corrected pattern was confirmed to
catch a real NBSP before the change was kept.1 parent 2b7202d commit 540dbc7
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments