mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
[ty] Refine message for why a rule is enabled (#18038)
This commit is contained in:
parent
d944a1397e
commit
fcd858e0c8
90 changed files with 184 additions and 181 deletions
|
@ -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()
|
||||
)
|
||||
}
|
||||
},
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue