-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Don't check [mentions] paths in submodules from tidy
#150892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't check [mentions] paths in submodules from tidy
#150892
Conversation
| // 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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this meant to be /,*?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/*).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right. Compared to the previous version I think we lose src/tools/cargo-foo, is that important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining, LGTM
|
@bors r=tgross35 rollup |
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
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 ```
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