@@ -29,31 +29,40 @@ def gen_examples(manifest):
2929 yield dir_ / manifest
3030
3131
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+
3243def default (args ):
3344 format_ (args )
3445
3546 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+ )
3756 else :
38- run ("cargo" , "clippy" , "--all-features" , "--tests" )
57+ run ("cargo" , "clippy" , "--all-features" , "--tests" , "--" , * LINT_CONFIG )
3958
4059 for manifest in gen_examples ("Cargo.toml" ):
41- run ("cargo" , "clippy" , "--manifest-path" , manifest )
60+ run ("cargo" , "clippy" , "--manifest-path" , manifest , "--" , * LINT_CONFIG )
4261
4362 run ("cargo" , "test" , "--all-features" , "--lib" , "--tests" )
4463
4564
4665def 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-
5766 run ("cargo" , "fmt" , "--" , "--check" )
5867
5968 run (
0 commit comments