-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
tidy: Add a check for inline unit tests #62996
Conversation
This also needs to check for |
I think false-positives are presumably infrequent enough that we could work around them via Approach looks good to me. It might be nicer to an extent to use the same |
`contents` is the whole file rather than a single line.
Updated.
Yeah, this is all temporary anyway, once this PR lands, I'll prepare another big PR moving the code, so it doesn't matter much. |
@bors r+ Looks good to me. I'm not entirely certain that the skip rules are correct, but since this is simply tidy we can correct that over time if we discover they're inaccurate. |
📌 Commit aecaa03 has been approved by |
tidy: Add a check for inline unit tests As described in rust-lang#61097. There's a large whitelist right now, because in many crates the tests are not outlined yet. ~This PR only outlines tests in one crate (`rustc_lexer`) as an example.~ r? @Mark-Simulacrum
tidy: Add a check for inline unit tests As described in rust-lang#61097. There's a large whitelist right now, because in many crates the tests are not outlined yet. ~This PR only outlines tests in one crate (`rustc_lexer`) as an example.~ r? @Mark-Simulacrum
tidy: Add a check for inline unit tests As described in rust-lang#61097. There's a large whitelist right now, because in many crates the tests are not outlined yet. ~This PR only outlines tests in one crate (`rustc_lexer`) as an example.~ r? @Mark-Simulacrum
Rollup of 8 pull requests Successful merges: - #61207 (Allow lifetime elision in `Pin<&(mut) Self>`) - #62074 (squash of all commits for nth_back on ChunksMut) - #62771 (Break dependencies between `syntax_ext` and other crates) - #62883 (Refactoring use common code between option, result and accum) - #62949 (Re-enable assertions in PPC dist builder) - #62996 (tidy: Add a check for inline unit tests) - #63038 (Make more informative error on outer attribute after inner) - #63050 (ci: download awscli from our mirror) Failed merges: r? @ghost
As described in #61097.
There's a large whitelist right now, because in many crates the tests are not outlined yet.
This PR only outlines tests in one crate (rustc_lexer
) as an example.r? @Mark-Simulacrum