running cargo clippy on a crate that has the clippy plugin enabled errors out due to duplicate lints
This commit is contained in:
parent
0dab78b3e6
commit
e3723cb938
@ -12,7 +12,11 @@ pub use clippy_lints::*;
|
||||
|
||||
#[plugin_registrar]
|
||||
pub fn plugin_registrar(reg: &mut Registry) {
|
||||
register_plugins(reg);
|
||||
if reg.sess.lint_store.borrow().get_lint_groups().iter().any(|&(s, _, _)| s == "clippy") {
|
||||
reg.sess.struct_warn("running cargo clippy on a crate that also imports the clippy plugin").emit();
|
||||
} else {
|
||||
register_plugins(reg);
|
||||
}
|
||||
}
|
||||
|
||||
// only exists to let the dogfood integration test works.
|
||||
|
Loading…
x
Reference in New Issue
Block a user