Skip to content

feat(cli): add --quiet to vp check - #2593

Open
RSS1102 wants to merge 5 commits into
voidzero-dev:mainfrom
RSS1102:rss1102/issue-2588-quiet-check
Open

feat(cli): add --quiet to vp check#2593
RSS1102 wants to merge 5 commits into
voidzero-dev:mainfrom
RSS1102:rss1102/issue-2588-quiet-check

Conversation

@RSS1102

@RSS1102 RSS1102 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add --quiet support to vp check and forward it to the Oxlint phase
  • suppress warning diagnostics while preserving the unified check summary and error failures
  • document the option and cover warning-only, error, and help output with CLI snapshots

Closes #2588

Example

With one lint error and one warning, vp check --quiet prints only the error diagnostic while preserving both counts in the unified summary:

pass: All 3 files are correctly formatted (<duration>, <n> threads)
error: Lint issues found
× eslint(no-eval): eval can be harmful.
   ╭─[src/index.js:2:3]
 1 │ function hello() {
 2 │   eval("code");
   ·   ────
 3 │   console.log("warning");
   ╰────
  help: Avoid eval().

Found 1 error and 1 warning in 2 files (<duration>, <n> threads)

The no-console warning diagnostic is omitted, matching vp lint --quiet, while the warning remains visible in the aggregate count.

Testing

  • cargo test -p vite-plus-cli check::analysis::tests
  • cargo test -p vp_cli_snapshots -- check_lint_warn::check_lint_warn
  • cargo test -p vp_cli_snapshots -- check_lint_fail::check_lint_fail
  • cargo test -p vp_cli_snapshots -- command_check_help::command_check_help
  • cargo clippy -p vite-plus-cli --all-targets --no-default-features -- --deny warnings
  • vp fmt --check packages/cli/src/help.ts docs/guide/check.md
  • cargo fmt --all -- --check

@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 90ea3b7
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a98db395ff2890008b0e9e5

@RSS1102
RSS1102 force-pushed the rss1102/issue-2588-quiet-check branch from 3e4bdeb to d99aadd Compare September 2, 2026 01:52
@RSS1102
RSS1102 marked this pull request as ready for review September 3, 2026 02:29
[[case]]
name = "check_fix_lint_warn"
vp = "local"
env = { VP_NODE_VERSION = "22.18.0" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary to add this environment variable? Is there a reason that causes the tests to be unstable?

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RSS1102 Thanks!

@fengmk2 fengmk2 self-assigned this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp check should have a --quiet flag

2 participants