mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue