mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Remove clippy plugin
This commit is contained in:
parent
8ab24d76dd
commit
a127e14631
2 changed files with 0 additions and 40 deletions
|
@ -22,11 +22,6 @@ publish = false
|
||||||
travis-ci = { repository = "rust-lang/rust-clippy" }
|
travis-ci = { repository = "rust-lang/rust-clippy" }
|
||||||
appveyor = { repository = "rust-lang/rust-clippy" }
|
appveyor = { repository = "rust-lang/rust-clippy" }
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "clippy"
|
|
||||||
plugin = true
|
|
||||||
test = false
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cargo-clippy"
|
name = "cargo-clippy"
|
||||||
test = false
|
test = false
|
||||||
|
|
35
src/lib.rs
35
src/lib.rs
|
@ -1,35 +0,0 @@
|
||||||
// error-pattern:cargo-clippy
|
|
||||||
#![feature(plugin_registrar)]
|
|
||||||
#![feature(rustc_private)]
|
|
||||||
#![warn(rust_2018_idioms)]
|
|
||||||
|
|
||||||
// FIXME: switch to something more ergonomic here, once available.
|
|
||||||
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
|
||||||
#[allow(unused_extern_crates)]
|
|
||||||
extern crate rustc_driver;
|
|
||||||
use self::rustc_driver::plugin::Registry;
|
|
||||||
|
|
||||||
#[plugin_registrar]
|
|
||||||
pub fn plugin_registrar(reg: &mut Registry<'_>) {
|
|
||||||
for (lint, _, _) in reg.lint_store.get_lint_groups() {
|
|
||||||
reg.sess
|
|
||||||
.struct_warn(
|
|
||||||
"the clippy plugin is being deprecated, please use cargo clippy or rls with the clippy feature",
|
|
||||||
)
|
|
||||||
.emit();
|
|
||||||
if lint == "clippy" {
|
|
||||||
// cargo clippy run on a crate that also uses the plugin
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let conf = clippy_lints::read_conf(reg.args(), ®.sess);
|
|
||||||
clippy_lints::register_plugins(&mut reg.lint_store, ®.sess, &conf);
|
|
||||||
}
|
|
||||||
|
|
||||||
// only exists to let the dogfood integration test works.
|
|
||||||
// Don't run clippy as an executable directly
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn main() {
|
|
||||||
panic!("Please use the cargo-clippy executable");
|
|
||||||
}
|
|
Loading…
Reference in a new issue