From a127e14631769f20a1d0a51e658986b15305da00 Mon Sep 17 00:00:00 2001 From: msizanoen Date: Tue, 22 Oct 2019 12:56:26 +0700 Subject: [PATCH] Remove clippy plugin --- Cargo.toml | 5 ----- src/lib.rs | 35 ----------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 1f5e2bb40..300e40d4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,11 +22,6 @@ publish = false travis-ci = { repository = "rust-lang/rust-clippy" } appveyor = { repository = "rust-lang/rust-clippy" } -[lib] -name = "clippy" -plugin = true -test = false - [[bin]] name = "cargo-clippy" test = false diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 6b398f6b9..000000000 --- a/src/lib.rs +++ /dev/null @@ -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"); -}