File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -51,4 +51,33 @@ pub fn check(path: &Path, bad: &mut bool) {
51
51
}
52
52
}
53
53
}
54
+
55
+ // Verify that trigger_files in [autolabel."*"] exist in the project, i.e.
56
+ // [autolabel."A-rustdoc-search"]
57
+ // trigger_files = [
58
+ // "src/librustdoc/html/static/js/search.js",
59
+ // "tests/rustdoc-js",
60
+ // "tests/rustdoc-js-std",
61
+ // ]
62
+ if let Some ( Value :: Table ( autolabels) ) = config. get ( "autolabel" ) {
63
+ for ( label, content) in autolabels {
64
+ if let Some ( trigger_files) = content. get ( "trigger_files" ) . and_then ( |v| v. as_array ( ) ) {
65
+ for file in trigger_files {
66
+ if let Some ( file_str) = file. as_str ( ) {
67
+ let full_path = path. join ( file_str) ;
68
+
69
+ // Handle both file and directory paths
70
+ if !full_path. exists ( ) {
71
+ tidy_error ! (
72
+ bad,
73
+ "triagebot.toml [autolabel.{}] contains trigger_files path '{}' which doesn't exist" ,
74
+ label,
75
+ file_str
76
+ ) ;
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
54
83
}
You can’t perform that action at this time.
0 commit comments