lint: port unused import braces diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
fc4f8d9bc2
commit
e24833869f
2 changed files with 3 additions and 1 deletions
|
@ -281,3 +281,5 @@ lint-path-statement-no-effect = path statement with no effect
|
||||||
|
|
||||||
lint-unused-delim = unnecessary {$delim} around {$item}
|
lint-unused-delim = unnecessary {$delim} around {$item}
|
||||||
.suggestion = remove these {$delim}
|
.suggestion = remove these {$delim}
|
||||||
|
|
||||||
|
lint-unused-import-braces = braces around {$node} is unnecessary
|
||||||
|
|
|
@ -1118,7 +1118,7 @@ impl UnusedImportBraces {
|
||||||
};
|
};
|
||||||
|
|
||||||
cx.struct_span_lint(UNUSED_IMPORT_BRACES, item.span, |lint| {
|
cx.struct_span_lint(UNUSED_IMPORT_BRACES, item.span, |lint| {
|
||||||
lint.build(&format!("braces around {} is unnecessary", node_name)).emit();
|
lint.build(fluent::lint::unused_import_braces).set_arg("node", node_name).emit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue