@@ -29,31 +29,40 @@ 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
+ )
41
+
42
+
32
43
def default (args ):
33
44
format_ (args )
34
45
35
46
if nightly ():
36
- run ("cargo" , "clippy" , "--all-features" , "--tests" , "--benches" )
47
+ run (
48
+ "cargo" ,
49
+ "clippy" ,
50
+ "--all-features" ,
51
+ "--tests" ,
52
+ "--benches" ,
53
+ "--" ,
54
+ * LINT_CONFIG ,
55
+ )
37
56
else :
38
- run ("cargo" , "clippy" , "--all-features" , "--tests" )
57
+ run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * LINT_CONFIG )
39
58
40
59
for manifest in gen_examples ("Cargo.toml" ):
41
- run ("cargo" , "clippy" , "--manifest-path" , manifest )
60
+ run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * LINT_CONFIG )
42
61
43
62
run ("cargo" , "test" , "--all-features" , "--lib" , "--tests" )
44
63
45
64
46
65
def check (args ):
47
- LINT_CONFIG = (
48
- "--deny" ,
49
- "warnings" ,
50
- # We usually want to make the GIL lifetime explicit.
51
- "--deny" ,
52
- "elided-lifetimes-in-paths" ,
53
- "--allow" ,
54
- "clippy::needless-lifetimes" ,
55
- )
56
-
57
66
run ("cargo" , "fmt" , "--" , "--check" )
58
67
59
68
run (
0 commit comments