diff options
| author | Ralf Jung <post@ralfj.de> | 2025-09-03 21:55:24 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-09-03 22:09:31 +0200 |
| commit | 2d20ee73a84c03907610f652d7f9d5454b070c33 (patch) | |
| tree | e9f21053d7acb73627b48e854bdfb051dd22ae17 | |
| parent | fea27a665c76996a90d5e19e38c9ddabd11a6512 (diff) | |
| download | rust-2d20ee73a84c03907610f652d7f9d5454b070c33.tar.gz rust-2d20ee73a84c03907610f652d7f9d5454b070c33.zip | |
support keyword-based mentions in tidy
| -rw-r--r-- | src/tools/tidy/src/triagebot.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/tidy/src/triagebot.rs b/src/tools/tidy/src/triagebot.rs index 305a0b4d264..6f25ed616fa 100644 --- a/src/tools/tidy/src/triagebot.rs +++ b/src/tools/tidy/src/triagebot.rs @@ -19,7 +19,12 @@ pub fn check(path: &Path, bad: &mut bool) { // Check [mentions."*"] sections, i.e. [mentions."compiler/rustc_const_eval/src/"] if let Some(Value::Table(mentions)) = config.get("mentions") { - for path_str in mentions.keys() { + for (entry_key, entry_val) in mentions.iter() { + // If the type is set to something other than "filename", then this is not a path. + if entry_val.get("type").is_some_and(|t| t.as_str().unwrap_or_default() != "filename") { + continue; + } + let path_str = entry_key; // Remove quotes from the path let clean_path = path_str.trim_matches('"'); let full_path = path.join(clean_path); |
