Skip to content

Commit 2d20ee7

Browse files
committed
support keyword-based mentions in tidy
1 parent fea27a6 commit 2d20ee7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tools/tidy/src/triagebot.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ pub fn check(path: &Path, bad: &mut bool) {
1919

2020
// Check [mentions."*"] sections, i.e. [mentions."compiler/rustc_const_eval/src/"]
2121
if let Some(Value::Table(mentions)) = config.get("mentions") {
22-
for path_str in mentions.keys() {
22+
for (entry_key, entry_val) in mentions.iter() {
23+
// If the type is set to something other than "filename", then this is not a path.
24+
if entry_val.get("type").is_some_and(|t| t.as_str().unwrap_or_default() != "filename") {
25+
continue;
26+
}
27+
let path_str = entry_key;
2328
// Remove quotes from the path
2429
let clean_path = path_str.trim_matches('"');
2530
let full_path = path.join(clean_path);

0 commit comments

Comments
 (0)