diff options
Diffstat (limited to 'cli/lint.rs')
-rw-r--r-- | cli/lint.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/lint.rs b/cli/lint.rs index ba159146e..7190192dc 100644 --- a/cli/lint.rs +++ b/cli/lint.rs @@ -105,6 +105,8 @@ pub async fn lint_files( pub fn print_rules_list() { let lint_rules = rules::get_recommended_rules(); + // The rules should still be printed even if `--quiet` option is enabled, + // so use `println!` here instead of `info!`. println!("Available rules:"); for rule in lint_rules { println!(" - {}", rule.code()); @@ -237,15 +239,15 @@ impl LintReporter for PrettyLintReporter { fn close(&mut self, check_count: usize) { match self.lint_count { - 1 => eprintln!("Found 1 problem"), - n if n > 1 => eprintln!("Found {} problems", self.lint_count), + 1 => info!("Found 1 problem"), + n if n > 1 => info!("Found {} problems", self.lint_count), _ => (), } match check_count { - 1 => println!("Checked 1 file"), - n if n > 1 => println!("Checked {} files", n), - _ => (), + n if n <= 1 => info!("Checked {} file", n), + n if n > 1 => info!("Checked {} files", n), + _ => unreachable!(), } } } |