feat(check): support --no-error-on-unmatched-pattern flag#1354
feat(check): support --no-error-on-unmatched-pattern flag#1354fengmk2 wants to merge 6 commits intorefactor-cli-othersfrom
--no-error-on-unmatched-pattern flag#1354Conversation
In `--fix` mode with file paths, implicitly suppress "no matching files" errors for both fmt and lint. This fixes the lint-staged use case where staged files may be excluded by ignorePatterns (e.g. package-lock.json excluded by fmt ignorePatterns). Also expose `--no-error-on-unmatched-pattern` as an explicit CLI flag for non-fix use cases. oxfmt supports this flag natively; for oxlint (which does not), vp check handles it by treating unparseable lint output as a pass when the flag is active. Closes #1210
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
507a843 to
c9de266
Compare
08a95ab to
8e4d260
Compare
Invert the empty if-branch into a negated guard condition. Improve comments to explain the asymmetry between fmt and lint None arms: oxfmt handles the flag natively (exits 0), while oxlint does not (exits non-zero), requiring an explicit status override.
|
@cursor review |
There was a problem hiding this comment.
BTW, I suspect the output we're getting for now is NOT the intended behavior?
❯ vp check noop VITE+ - The Unified Toolchain for the Web error: Formatting could not start Checking formatting... Finished in 90ms on 0 files using 8 threads. No files found matching the given patterns. Formatting failed before analysis started pass: Found no warnings, lint errors, or type errors in 0 files (82ms, 8 threads)vp check [PATH] automatically set vp fmt --no-error-on-unmatched-pattern to surpress error, but it reports error.
Just wondering if this case also fixed?
… is active Only suppress lint errors when the output is empty (no files to lint). If oxlint produced error output (config error, crash, etc.), surface it even when --no-error-on-unmatched-pattern is active.
…matched Add snap test that runs `vp check --fix` with paths (activating suppress_unmatched) on a file with a real lint error, confirming the error is still surfaced and the command exits non-zero.
Replace .oxlintrc.json with vite.config.ts in the check-fix-lint-error-not-swallowed snap test to match the preferred configuration style used across other snap tests.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a82d5a0. Configure here.

In
--fixmode with file paths, implicitly suppress "no matchingfiles" errors for both fmt and lint. This fixes the lint-staged use
case where staged files may be excluded by ignorePatterns (e.g.
package-lock.json excluded by fmt ignorePatterns).
Also expose
--no-error-on-unmatched-patternas an explicit CLIflag for non-fix use cases. oxfmt supports this flag natively; for
oxlint (which does not), vp check handles it by treating unparseable
lint output as a pass when the flag is active.
Closes #1210
Note
Medium Risk
Changes
vp checkexit-status behavior in edge cases (unmatched/ignored file patterns), which can affect CI and pre-commit workflows. Risk is mitigated by targeted suppression logic and new snapshot tests covering both pass and fail scenarios.Overview
vp checknow supports a new--no-error-on-unmatched-patternflag and also implicitly enables it for the common--fix+ explicit paths (lint-staged) flow, preventing non-zero exits when all provided paths are excluded/ignored.The check orchestration updates how fmt/lint failures are interpreted: oxfmt is passed the flag directly, and lint “could not start” cases are only treated as success when suppression is active and the captured output is empty (so real lint/config errors still fail). Help text, RFC docs, and snapshot tests are updated/added to cover the new flag and edge cases.
Reviewed by Cursor Bugbot for commit a82d5a0. Configure here.