Skip to content

Commit d3e2e72

Browse files
committed
fix(check): avoid swallowing real lint errors when suppress_unmatched 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.
1 parent 201555e commit d3e2e72

File tree

1 file changed

+4
-4
lines changed
  • packages/cli/binding/src/check

1 file changed

+4
-4
lines changed

packages/cli/binding/src/check/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ pub(crate) async fn execute_check(
190190
));
191191
}
192192
None => {
193-
if suppress_unmatched {
194-
// oxlint does not support --no-error-on-unmatched-pattern natively
195-
// and exits non-zero when no files match, so we must override the
196-
// status here (unlike fmt, where oxfmt handles the flag and exits 0).
193+
// Only suppress when the output is empty (no files to lint).
194+
// If oxlint produced error output (config error, crash, etc.),
195+
// surface it even when suppress_unmatched is active.
196+
if suppress_unmatched && combined_output.trim().is_empty() {
197197
status = ExitStatus::SUCCESS;
198198
} else {
199199
output::error("Linting could not start");

0 commit comments

Comments
 (0)