Skip to content

vp check exits with status 0 on warnings even when options.denyWarnings is enabled #1424

@ponko2

Description

@ponko2

Describe the bug

When running vp check with options.denyWarnings set to true, the exit status is 0 even if warnings are present.

In the same situation, vp lint exits with status 1, so it would be helpful if vp check behaved similarly and returned a non-zero exit status when warnings are detected.

Currently, this also affects vp staged, as commits are still allowed even when warnings exist. Ideally, it would be great if warnings could prevent commits when options.denyWarnings is enabled.

This might be related to the following PR, although I'm not entirely sure if this is directly connected: #1268

Please let me know if this behavior is intentional or if I might be misunderstanding the expected usage.

Reproduction

https://github.com/ponko2/vp-check-exit-code-warnings-repro

Steps to reproduce

$ git clone https://github.com/ponko2/vp-check-exit-code-warnings-repro
Cloning into 'vp-check-exit-code-warnings-repro'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 20 (delta 3), reused 19 (delta 2), pack-reused 0 (from 0)
Receiving objects: 100% (20/20), 17.51 KiB | 943.00 KiB/s, done.
Resolving deltas: 100% (3/3), done.

$ cd vp-check-exit-code-warnings-repro/

$ vp install

VITE+ - The Unified Toolchain for the Web

Lockfile is up to date, resolution step is skipped
Packages: +63
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 63, reused 63, downloaded 0, added 63, done

devDependencies:
+ @types/node 25.6.0
+ @typescript/native-preview 7.0.0-dev.20260328.1
+ bumpp 11.0.1
+ typescript 6.0.3
+ vite-plus 0.1.18

. prepare$ vp config
└─ Done in 611ms
Done in 914ms using pnpm v10.33.0

tip: Available short aliases: i = install, rm = remove, un = uninstall, up = update, ls = list, ln = link

$ vp lint
VITE+ - The Unified Toolchain for the Web


  ⚠ eslint(no-console): Unexpected console statement.
   ╭─[src/index.ts:2:3]
 1 │ export function fn() {
 2 │   console.log("Hello, World!");
   ·   ───────────
 3 │   return "Hello, tsdown!";
   ╰────
  help: Delete this console statement.

Found 1 warning and 0 errors.
Finished in 516ms on 3 files with 109 rules using 10 threads.

$ echo $?
1

$ vp check
VITE+ - The Unified Toolchain for the Web

pass: All 7 files are correctly formatted (148ms, 10 threads)
warn: Lint or type warnings found
⚠ eslint(no-console): Unexpected console statement.
   ╭─[src/index.ts:2:3]
 1 │ export function fn() {
 2 │   console.log("Hello, World!");
   ·   ───────────
 3 │   return "Hello, tsdown!";
   ╰────
  help: Delete this console statement.

Found 0 errors and 1 warning in 3 files (133ms, 10 threads)

$ echo $?
0

System Info

$ vp env current
VITE+ - The Unified Toolchain for the Web

Environment:
  Version  24.15.0
  Source   lts

Tool Paths:
  node  /Users/kano/.vite-plus/js_runtime/node/24.15.0/bin/node
  npm   /Users/kano/.vite-plus/js_runtime/node/24.15.0/bin/npm
  npx   /Users/kano/.vite-plus/js_runtime/node/24.15.0/bin/npx

$ vp --version
VITE+ - The Unified Toolchain for the Web

vp v0.1.18

Local vite-plus:
  vite-plus  v0.1.18

Tools:
  vite             v8.0.8
  rolldown         v1.0.0-rc.15
  vitest           v4.1.4
  oxfmt            v0.45.0
  oxlint           v1.60.0
  oxlint-tsgolint  v0.20.0
  tsdown           v0.21.8

Environment:
  Package manager  pnpm v10.33.0
  Node.js          v24.15.0

Used Package Manager

pnpm

Logs

Validations

Metadata

Metadata

Assignees

Type

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions