@@ -29,15 +29,7 @@ def gen_examples(manifest):
29
29
yield dir_ / manifest
30
30
31
31
32
- LINT_CONFIG = (
33
- "--deny" ,
34
- "warnings" ,
35
- # We usually want to make the GIL lifetime explicit.
36
- "--deny" ,
37
- "elided-lifetimes-in-paths" ,
38
- "--allow" ,
39
- "clippy::needless-lifetimes" ,
40
- )
32
+ DENY_WARNINGS = ("--deny" , "warnings" )
41
33
42
34
43
35
def default (args ):
@@ -51,40 +43,24 @@ def default(args):
51
43
"--tests" ,
52
44
"--benches" ,
53
45
"--" ,
54
- * LINT_CONFIG ,
46
+ * DENY_WARNINGS ,
55
47
)
56
48
else :
57
- run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * LINT_CONFIG )
49
+ run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * DENY_WARNINGS )
58
50
59
51
for manifest in gen_examples ("Cargo.toml" ):
60
- run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * LINT_CONFIG )
52
+ run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * DENY_WARNINGS )
61
53
62
54
run ("cargo" , "test" , "--all-features" , "--lib" , "--tests" )
63
55
64
56
65
57
def check (args ):
66
58
run ("cargo" , "fmt" , "--" , "--check" )
67
-
68
- run (
69
- "cargo" ,
70
- "clippy" ,
71
- "--all-features" ,
72
- "--tests" ,
73
- "--" ,
74
- * LINT_CONFIG ,
75
- )
59
+ run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * DENY_WARNINGS )
76
60
77
61
for manifest in gen_examples ("Cargo.toml" ):
78
62
run ("cargo" , "fmt" , "--manifest-path" , manifest , "--" , "--check" )
79
-
80
- run (
81
- "cargo" ,
82
- "clippy" ,
83
- "--manifest-path" ,
84
- manifest ,
85
- "--" ,
86
- * LINT_CONFIG ,
87
- )
63
+ run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * DENY_WARNINGS )
88
64
89
65
90
66
def doc (args ):
0 commit comments