Don't check [mentions] paths in submodules from tidy#150892
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Jan 10, 2026
Merged
Don't check [mentions] paths in submodules from tidy#150892rust-bors[bot] merged 1 commit intorust-lang:mainfrom
[mentions] paths in submodules from tidy#150892rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
tgross35
reviewed
Jan 9, 2026
| // to be checked against all the file and directories in the repository. | ||
| builder.add(globset::Glob::new(&format!("{clean_path}*")).unwrap()); | ||
| let trimmed_path = clean_path.trim_end_matches('/'); | ||
| builder.add(globset::Glob::new(&format!("{trimmed_path}{{,/*}}")).unwrap()); |
Member
Author
There was a problem hiding this comment.
No, it's meant to be {,/*}.
We either want src/tools/cargo to be matched by it-self or anything under it (so src/tools/cargo/*).
Contributor
There was a problem hiding this comment.
Ah, right. Compared to the previous version I think we lose src/tools/cargo-foo, is that important?
Member
Author
There was a problem hiding this comment.
Yes, that's what we want, we don't want people to be pinged for src/tools/cargotest if the mentions is for src/tools/cargo.
If they really want to be pinged for both, they can do src/tools/cargo* or src/tools/cargo{,test}.
tgross35
approved these changes
Jan 9, 2026
Member
Author
|
@bors r=tgross35 rollup |
Contributor
rust-bors bot
added a commit
that referenced
this pull request
Jan 10, 2026
Rollup of 9 pull requests Successful merges: - #149318 (Implement partial_sort_unstable for slice) - #150805 (Fix ICE in inline always warning emission.) - #150822 (Fix for ICE: eii: fn / macro rules None in find_attr()) - #150853 (std: sys: fs: uefi: Implement File::read) - #150855 (std: sys: fs: uefi: Implement File::tell) - #150881 (Fix std::fs::copy on WASI by setting proper OpenOptions flags) - #150891 (Fix a trivial typo in def_id.rs) - #150892 (Don't check `[mentions]` paths in submodules from tidy) - #150894 (cg_llvm: add a pause to make comment less confusing) r? @ghost
rust-timer
added a commit
that referenced
this pull request
Jan 10, 2026
Rollup merge of #150892 - tidy-triagebot-mentions-submodules, r=tgross35 Don't check `[mentions]` paths in submodules from tidy As we were reminded in [#triagebot > Mentions glob matching](https://rust-lang.zulipchat.com/#narrow/channel/224082-triagebot/topic/Mentions.20glob.20matching/with/567093226), triagebot cannot see changes in submodules. So let's reflect that in the `tidy` check to avoid accidentally adding paths inside submodules. I tested it with these entries: ```toml [mentions."src/tools/cargo"] cc = ["@ehuss"] [mentions."src/tools/cargo/"] cc = ["@ehuss"] [mentions."src/tools/cargo/*"] cc = ["@ehuss"] [mentions."src/tools/cargo/README.md"] cc = ["@ehuss"] ``` and got (as expected): ``` tidy [triagebot]: triagebot.toml [mentions.*] 'src/tools/cargo/README.md' cannot match inside a submodule tidy [triagebot]: triagebot.toml [mentions.*] contains 'src/tools/cargo/*' which doesn't match any file or directory in the repository ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As we were reminded in #triagebot > Mentions glob matching, triagebot cannot see changes in submodules.
So let's reflect that in the
tidycheck to avoid accidentally adding paths inside submodules.I tested it with these entries:
and got (as expected):
r? @tgross35