From ea22d3ceb83e270e214ba82501b33c4a91eb59a7 Mon Sep 17 00:00:00 2001 From: Boshen Date: Thu, 11 Jan 2024 20:41:06 +0800 Subject: [PATCH] fix(diagnostics): always print without considering the `--max-warnings` option (#1996) closes #1958 `--max-warnings` is only used to control the exit code, it does not affect diagnostic printing. --- crates/oxc_diagnostics/src/service.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/oxc_diagnostics/src/service.rs b/crates/oxc_diagnostics/src/service.rs index 0eee575f8..0a9400819 100644 --- a/crates/oxc_diagnostics/src/service.rs +++ b/crates/oxc_diagnostics/src/service.rs @@ -113,12 +113,6 @@ impl DiagnosticService { else if self.quiet { continue; } - - if let Some(max_warnings) = self.max_warnings { - if self.warnings_count() > max_warnings { - continue; - } - } } let mut err = String::new();