mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
fix(lint): don't mark plugin diagnostic as fixable, if it's not (#28147)
A vector with fixes was always created, even if there were no applicable fixes.
This commit is contained in:
parent
70d775c57d
commit
1f169f4b09
6 changed files with 48 additions and 4 deletions
|
@ -146,10 +146,14 @@ impl LintPluginContainer {
|
|||
})
|
||||
.collect::<Result<Vec<LintFixChange>, LintReportError>>()?;
|
||||
|
||||
let fixes = vec![LintFix {
|
||||
changes,
|
||||
description: format!("Fix this {} problem", id).into(),
|
||||
}];
|
||||
let mut fixes = vec![];
|
||||
|
||||
if !changes.is_empty() {
|
||||
fixes.push(LintFix {
|
||||
changes,
|
||||
description: format!("Fix this {} problem", id).into(),
|
||||
});
|
||||
}
|
||||
|
||||
let lint_diagnostic = LintDiagnostic {
|
||||
specifier,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue