Fix: return 0 exit code when warnings<max_warnings (#933)

`oxlint --max-warnings 99999` should exit with success status code when
there are warnings but no errors found. Currently any warning or error
results in an exit status of 1.
This commit is contained in:
Jason Miller 2023-09-23 07:46:15 -04:00 committed by GitHub
parent d700cf899c
commit a4c064795c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ impl Termination for CliRunResult {
if number_of_errors == 1 { "" } else { "s" }
);
let exit_code = u8::from(number_of_diagnostics > 0);
let exit_code = u8::from(number_of_errors > 0);
ExitCode::from(exit_code)
}
Self::TypeCheckResult { duration, number_of_diagnostics } => {