File tree 1 file changed +26
-0
lines changed
crates/tracel-xtask/src/utils
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,32 @@ pub fn custom_crates_build(
30
30
} )
31
31
}
32
32
33
+ /// Allow to check additional crates outside the common check commands
34
+ pub fn custom_crates_check (
35
+ crates : Vec < & str > ,
36
+ args : Vec < & str > ,
37
+ envs : Option < HashMap < & str , & str > > ,
38
+ path : Option < & Path > ,
39
+ group_msg : & str ,
40
+ ) -> anyhow:: Result < ( ) > {
41
+ let mut base_args = vec ! [ "check" , "--color" , "always" ] ;
42
+ base_args. extend ( args) ;
43
+ crates. iter ( ) . try_for_each ( |c| {
44
+ group ! ( "Custom Check: {} ({})" , * c, group_msg) ;
45
+ let mut args = base_args. clone ( ) ;
46
+ args. extend ( vec ! [ "-p" , * c] ) ;
47
+ run_process (
48
+ "cargo" ,
49
+ & args,
50
+ envs. clone ( ) ,
51
+ path,
52
+ & format ! ( "Custom check failed for {}" , * c) ,
53
+ ) ?;
54
+ endgroup ! ( ) ;
55
+ Ok ( ( ) )
56
+ } )
57
+ }
58
+
33
59
/// Allow to test additional crates with specific flags and config
34
60
pub fn custom_crates_tests (
35
61
crates : Vec < & str > ,
You can’t perform that action at this time.
0 commit comments