diff --git a/crates/noirc_errors/src/reporter.rs b/crates/noirc_errors/src/reporter.rs index 8f4cdd9b551..d55189e80ac 100644 --- a/crates/noirc_errors/src/reporter.rs +++ b/crates/noirc_errors/src/reporter.rs @@ -115,6 +115,10 @@ pub fn report_all( diagnostics: &[FileDiagnostic], deny_warnings: bool, ) -> ReportedErrors { + // Report warnings before any errors + let (mut diagnostics, mut errors): (Vec<_>, _) = + diagnostics.iter().partition(|item| item.diagnostic.is_warning()); + diagnostics.append(&mut errors); let error_count = diagnostics.iter().map(|error| error.report(files, deny_warnings) as u32).sum();