Commit 6bfcbdb
authored
fix(check): respect oxlint exit code so denyWarnings fails
`vp check` was unconditionally resetting the status to success whenever
lint reported only warnings, masking the non-zero exit code produced by
oxlint when `options.denyWarnings` (or `--deny-warnings`) is enabled.
Drop the override and trust oxlint's exit code so warning-only runs fail
the check when warnings have been opted in as failures.
Closes #1424
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes `vp check` exit-code behavior for warning-only lint results,
which can cause previously-passing pipelines to fail when `denyWarnings`
is enabled. Scope is small and localized to the check command plus a new
regression snap-test.
>
> **Overview**
> `vp check` no longer forces a success exit status when oxlint reports
only warnings; it now propagates oxlint’s actual exit code so
`lint.options.denyWarnings` (or `--deny-warnings`) correctly fails the
check.
>
> Adds a new snap-test fixture `check-lint-warn-deny-warnings` that
configures `denyWarnings: true` with a warning-level `no-console` rule
and asserts the expected warning output and summary.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f6466c2. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->vp check (#1425)1 parent 58141d7 commit 6bfcbdb
File tree
6 files changed
+39
-1
lines changed- packages/cli
- binding/src/check
- snap-tests/check-lint-warn-deny-warnings
- src
6 files changed
+39
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments