Repository navigation
Commit 72b9834
fix(cli): match Vale's extension routing case for case, as measured
Review asked whether the exclusion glob's case-sensitivity could let
`GUIDE.ADOC` past the `--glob` and reproduce the whole-run crash. Measured
against the pinned 3.17.1 binary, it cannot: Vale routes on the extension
exactly as spelled. `doc.adoc` exits 2 with `E100 [lintAdoc]`; `doc.ADOC`
and `doc.AdOc` are read as plain text and exit 0 with findings — including
when the uppercase spelling names a lowercase file on a case-insensitive
filesystem, since Vale routes on the path string it was handed.
That leaves the asymmetry pointing the other way. `converterFor` lowercased
on the assumption that a case-insensitive filesystem would make `README.RST`
reStructuredText to Vale, so a file Vale had linted perfectly well could be
named in the skip notice as one it never checked. Node's `glob` folds case
with the filesystem, so the notice walk found `docs/GUIDE.ADOC` on macOS and
not on Linux — a wrong notice on exactly one platform.
`converterFor` now compares case-sensitively, and the walk re-checks every
match through it rather than trusting the pattern. A new vendor-contract
probe pins the binary's half: an uppercase converter-dependent extension
must exit 0 with no `E100`, so a Vale that becomes case-insensitive turns
red here before it can crash a user's run.
Also corrects `skippedFilesNotice`'s doc comment, which still described the
converter name as something to install — the message itself stopped saying
that, and the tests already forbid it.
No change to `capabilities.ts`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cyga14bww8rmazH2XrF8ms1 parent 2e71df7 commit 72b9834
3 files changed
Lines changed: 85 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
112 | 124 | | |
113 | 125 | | |
114 | | - | |
| 126 | + | |
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
| |||
173 | 185 | | |
174 | 186 | | |
175 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
176 | 196 | | |
177 | 197 | | |
178 | 198 | | |
| |||
203 | 223 | | |
204 | 224 | | |
205 | 225 | | |
206 | | - | |
| 226 | + | |
207 | 227 | | |
208 | 228 | | |
209 | 229 | | |
| |||
219 | 239 | | |
220 | 240 | | |
221 | 241 | | |
222 | | - | |
| 242 | + | |
223 | 243 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
227 | 251 | | |
228 | 252 | | |
229 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
| |||
204 | 211 | | |
205 | 212 | | |
206 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
207 | 232 | | |
208 | 233 | | |
209 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
628 | 650 | | |
629 | 651 | | |
630 | 652 | | |
| |||
0 commit comments