[ty] Refine message for why a rule is enabled (#18038)

This commit is contained in:
Micha Reiser 2025-05-12 13:31:42 +02:00 committed by GitHub
parent d944a1397e
commit fcd858e0c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
90 changed files with 184 additions and 181 deletions

View file

@ -318,10 +318,13 @@ impl Drop for LintDiagnosticGuard<'_, '_> {
diag.sub(SubDiagnostic::new(
Severity::Info,
match self.source {
LintSource::Default => format!("`{}` is enabled by default", diag.id()),
LintSource::Cli => format!("`{}` was selected on the command line", diag.id()),
LintSource::Default => format!("rule `{}` is enabled by default", diag.id()),
LintSource::Cli => format!("rule `{}` was selected on the command line", diag.id()),
LintSource::File => {
format!("`{}` was selected in the configuration file", diag.id())
format!(
"rule `{}` was selected in the configuration file",
diag.id()
)
}
},
));