Skip to content

Commit fd8a1d2

Browse files
committed
Remove all mention and testing of #[plugin(clippy)] and warn if used
1 parent 654ff18 commit fd8a1d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+39
-122
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 7 deletions

README.md

Lines changed: 1 addition & 1 deletion

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ extern crate clippy_lints;
1414
pub fn plugin_registrar(reg: &mut Registry) {
1515
reg.sess.lint_store.with_read_lock(|lint_store| {
1616
for (lint, _, _) in lint_store.get_lint_groups() {
17+
reg.sess
18+
.struct_warn("the clippy plugin is being deprecated, please use cargo clippy or rls with the clippy feature")
19+
.emit();
1720
if lint == "clippy" {
18-
reg.sess
19-
.struct_warn("running cargo clippy on a crate that also imports the clippy plugin")
20-
.emit();
21+
// cargo clippy run on a crate that also uses the plugin
2122
return;
2223
}
2324
}

tests/conf_whitelisted.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/cc_seme.rs renamed to tests/run-pass/cc_seme.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(plugin)]
2-
#![plugin(clippy)]
3-
41
#[allow(dead_code)]
52
enum Baz {
63
One,
@@ -12,7 +9,9 @@ struct Test {
129
b: Baz,
1310
}
1411

15-
fn main() {
12+
fn main() { }
13+
14+
pub fn foo() {
1615
use Baz::*;
1716
let x = Test { t: Some(0), b: One };
1817

tests/ice_exacte_size.rs renamed to tests/run-pass/ice_exacte_size.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(plugin)]
2-
#![plugin(clippy)]
31
#![deny(clippy)]
42

53
#[allow(dead_code)]
@@ -15,3 +13,5 @@ impl Iterator for Foo {
1513
}
1614

1715
impl ExactSizeIterator for Foo {}
16+
17+
fn main() {}

tests/issue-825.rs renamed to tests/run-pass/issue-825.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(plugin)]
2-
#![plugin(clippy)]
31
#![allow(warnings)]
42

53
// this should compile in a reasonable amount of time
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#![feature(plugin)]
2-
#![plugin(clippy)]
31
#![deny(mut_mut, zero_ptr, cmp_nan)]
42
#![allow(dead_code)]
53

6-
#[macro_use]
7-
extern crate lazy_static;
4+
// compiletest + extern crates doesn't work together
5+
//#[macro_use]
6+
//extern crate lazy_static;
87

9-
use std::collections::HashMap;
8+
//use std::collections::HashMap;
109

1110
// ensure that we don't suggest `is_nan` and `is_null` inside constants
1211
// FIXME: once const fn is stable, suggest these functions again in constants
@@ -17,6 +16,7 @@ static mut BUH: bool = 42.0 < std::f32::NAN;
1716

1817
#[allow(unused_variables, unused_mut)]
1918
fn main() {
19+
/*
2020
lazy_static! {
2121
static ref MUT_MAP : HashMap<usize, &'static str> = {
2222
let mut m = HashMap::new();
@@ -26,6 +26,7 @@ fn main() {
2626
static ref MUT_COUNT : usize = MUT_MAP.len();
2727
}
2828
assert_eq!(*MUT_COUNT, 1);
29+
*/
2930
// FIXME: don't lint in array length, requires `check_body`
3031
//let _ = [""; (42.0 < std::f32::NAN) as usize];
3132
}

tests/used_underscore_binding_macro.rs renamed to tests/run-pass/used_underscore_binding_macro.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#![feature(plugin)]
2-
#![plugin(clippy)]
1+
2+
33

44
#[macro_use]
55
extern crate serde_derive;
@@ -16,3 +16,5 @@ struct MacroAttributesTest {
1616
fn macro_attributes_test() {
1717
let _ = MacroAttributesTest { _foo: 0 };
1818
}
19+
20+
fn main() {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn main() {}
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// error-pattern: error reading Clippy's configuration file
22

33

4-
#![plugin(clippy(conf_file="../ui/conf_bad_toml.toml"))]
4+
55

66
fn main() {}

tests/ui/bad_toml/conf_bad_toml.stderr

Whitespace-only changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// error-pattern: error reading Clippy's configuration file: `blacklisted-names` is expected to be a `Vec < String >` but is a `integer`
22

33

4-
#![plugin(clippy(conf_file="../ui/conf_bad_type.toml"))]
4+
55

66
fn main() {}

tests/ui/bad_toml_type/conf_bad_type.stderr

Whitespace-only changes.

tests/ui/conf_bad_arg.rs

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/ui/conf_bad_arg.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/conf_bad_toml.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/conf_bad_type.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/conf_french_blacklisted_name.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/conf_path_non_string.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/ui/conf_path_non_string.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/conf_unknown_key.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/cyclomatic_complexity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, custom_attribute)]
1+
#![feature(custom_attribute)]
22

33
#![allow(clippy)]
44
#![warn(cyclomatic_complexity)]

tests/ui/cyclomatic_complexity_attr_used.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, custom_attribute)]
1+
#![feature(custom_attribute)]
22

33
#![warn(cyclomatic_complexity)]
44
#![warn(unused)]

tests/ui/diverging_sub_expression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, never_type)]
1+
#![feature(never_type)]
22

33
#![warn(diverging_sub_expression)]
44
#![allow(match_same_arms, logic_bug)]

tests/ui/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, alloc)]
1+
#![feature(alloc)]
22
#![feature(associated_type_defaults)]
33

44

tests/ui/enum_variants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, non_ascii_idents)]
1+
#![feature(non_ascii_idents)]
22

33
#![warn(clippy, pub_enum_variant_names)]
44

tests/ui/escape_analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, box_syntax)]
1+
#![feature(box_syntax)]
22

33
#![allow(warnings, clippy)]
44

tests/ui/excessive_precision.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, custom_attribute)]
1+
#![feature(custom_attribute)]
22
#![warn(excessive_precision)]
33
#![allow(print_literal)]
44

tests/ui/for_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, custom_attribute)]
1+
#![feature(custom_attribute)]
22

33

44
use std::collections::*;

tests/ui/mut_mut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#![allow(unused, no_effect, unnecessary_operation)]
55
#![warn(mut_mut)]
66

7-
//#![plugin(regex_macros)]
8-
//extern crate regex;
7+
8+
99

1010
fn fun(x : &mut &mut u32) -> bool {
1111
**x > 0

tests/ui/new_without_default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, const_fn)]
1+
#![feature(const_fn)]
22

33

44
#![allow(dead_code)]

tests/ui/no_effect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, box_syntax)]
1+
#![feature(box_syntax)]
22

33

44
#![warn(no_effect, unnecessary_operation)]

tests/ui/conf_french_blacklisted_name.rs renamed to tests/ui/toml_blacklist/conf_french_blacklisted_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#![plugin(clippy(conf_file="../auxiliary/conf_french_blacklisted_name.toml"))]
2+
33

44
#![allow(dead_code)]
55
#![allow(single_match)]

tests/ui/toml_blacklist/conf_french_blacklisted_name.stderr

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// error-pattern: error reading Clippy's configuration file: unknown key `foobar`
22

33

4-
#![plugin(clippy(conf_file="../auxiliary/conf_unknown_key.toml"))]
4+
55

66
fn main() {}

tests/ui/toml_unknown_key/conf_unknown_key.stderr

Whitespace-only changes.

tests/ui/trailing_zeros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(plugin, custom_attribute, stmt_expr_attributes)]
1+
#![feature(custom_attribute, stmt_expr_attributes)]
22

33
#![allow(unused_parens)]
44

0 commit comments

Comments
 (0)