@@ -57,6 +57,21 @@ fn dogfood() {
57
57
) ;
58
58
}
59
59
60
+ const DENY_LINTS : & [ & str ] = & [
61
+ "unfulfilled_lint_expectations" ,
62
+ "clippy::all" ,
63
+ "clippy::pedantic" ,
64
+ "clippy::dbg_macro" ,
65
+ "clippy::decimal_literal_representation" ,
66
+ "clippy::derive_partial_eq_without_eq" ,
67
+ "clippy::iter_on_empty_collections" ,
68
+ "clippy::iter_on_single_items" ,
69
+ "clippy::needless_pass_by_ref_mut" ,
70
+ "clippy::significant_drop_tightening" ,
71
+ "clippy::tuple_array_conversions" ,
72
+ "clippy::useless_let_if_seq" ,
73
+ ] ;
74
+
60
75
#[ must_use]
61
76
fn run_clippy_for_package ( project : & str ) -> bool {
62
77
let root_dir = PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
@@ -82,32 +97,11 @@ fn run_clippy_for_package(project: &str) -> bool {
82
97
83
98
command. arg ( "--" ) ;
84
99
command. arg ( "-Cdebuginfo=0" ) ; // disable debuginfo to generate less data in the target dir
85
- command. args ( [
86
- "-D" ,
87
- "unfulfilled_lint_expectations" ,
88
- "-D" ,
89
- "clippy::all" ,
90
- "-D" ,
91
- "clippy::pedantic" ,
92
- "-D" ,
93
- "clippy::dbg_macro" ,
94
- "-D" ,
95
- "clippy::decimal_literal_representation" ,
96
- "-D" ,
97
- "clippy::derive_partial_eq_without_eq" ,
98
- "-D" ,
99
- "clippy::iter_on_empty_collections" ,
100
- "-D" ,
101
- "clippy::iter_on_single_items" ,
102
- "-D" ,
103
- "clippy::needless_pass_by_ref_mut" ,
104
- "-D" ,
105
- "clippy::significant_drop_tightening" ,
106
- "-D" ,
107
- "clippy::tuple_array_conversions" ,
108
- "-D" ,
109
- "clippy::useless_let_if_seq" ,
110
- ] ) ;
100
+
101
+ for lint in DENY_LINTS {
102
+ command. args ( [ "-D" , lint] ) ;
103
+ }
104
+
111
105
if !cfg ! ( feature = "internal" ) {
112
106
// running a clippy built without internal lints on the clippy source
113
107
// that contains e.g. `allow(clippy::symbol_as_str)`
0 commit comments