Skip to content

Commit 886a6aa

Browse files
committed
support keyword-based mentions in tidy
1 parent fea27a6 commit 886a6aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/tidy/src/triagebot.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ 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 entry_val.get("type").is_some_and(|t| t.as_str().unwrap_or_default() != "filename") {
24+
continue;
25+
}
26+
let path_str = entry_key;
2327
// Remove quotes from the path
2428
let clean_path = path_str.trim_matches('"');
2529
let full_path = path.join(clean_path);

0 commit comments

Comments
 (0)