From 2cacd17a7f49a523becaa0c74b873202e88053e0 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 | 37 ------------------------------------- 2 files changed, 42 deletions(-) delete mode 100644 src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 1f4a61afd8f2..20361697f2b2 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 76e1c711656b..000000000000 --- a/src/lib.rs +++ /dev/null @@ -1,37 +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<'_>) { - reg.sess.lint_store.with_read_lock(|lint_store| { - for (lint, _, _) in 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); - clippy_lints::register_plugins(reg, &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"); -}