Refactor rustc lint API
This commit is contained in:
parent
65445a571c
commit
a8f7e244b7
64 changed files with 1760 additions and 1555 deletions
|
@ -48,11 +48,18 @@ fn maybe_lint_redundant_semis(cx: &EarlyContext<'_>, seq: &mut Option<(Span, boo
|
|||
return;
|
||||
}
|
||||
|
||||
cx.struct_span_lint(REDUNDANT_SEMICOLONS, span, |lint| {
|
||||
lint.build(fluent::lint::redundant_semicolons)
|
||||
.set_arg("multiple", multiple)
|
||||
.span_suggestion(span, fluent::lint::suggestion, "", Applicability::MaybeIncorrect)
|
||||
.emit();
|
||||
});
|
||||
cx.struct_span_lint(
|
||||
REDUNDANT_SEMICOLONS,
|
||||
span,
|
||||
fluent::lint::redundant_semicolons,
|
||||
|lint| {
|
||||
lint.set_arg("multiple", multiple).span_suggestion(
|
||||
span,
|
||||
fluent::lint::suggestion,
|
||||
"",
|
||||
Applicability::MaybeIncorrect,
|
||||
)
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue