Commit 3f94056
.pytool/SpellCheck: Fix silent cspell run error
In the implementation of the SpellCheck prior to this commit, the logic
assumed that if it was able to successfully call `cspell --version` to
get the version, then any future usage of cspell would work without
error. PR #11783 brought to light an issue in this logic where if the
node version was too out of date, `cspell` could successfully run
`cspell --version` but would hit a runtime error when actually
performing a spell check on a package. This ultimetly resulted in
cspell not running for any package but still reporting a "Success".
This commit updates the error handling logic in the SpellCheck when
running cspell to ensure that when cspell error lines were reported, at
least one misspelled word must be found. In the scenario where error
lines are reported, but no misspelled words were found, we now assume a
runtime error occurred in cspell, log it, and fail the plugin.
Signed-off-by: Joey Vagedes <[email protected]>1 parent faa0ebc commit 3f94056
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
| |||
0 commit comments