-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add tidy check to detect empty files #41935
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
src/tools/tidy/src/style.rs
Outdated
|
||
if contents.is_empty() { | ||
tidy_error!(bad, "{}: empty file", file.display()); | ||
return |
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.
it should not return here, so that you get the full set of tidy errors.
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.
I figured the early-return would be fine since the other checks are based on contents
containing things, but I guess there isn't much harm in going through them anyways.
Addresses #18439.
@bors r+ rollup |
📌 Commit 99bca6e has been approved by |
…Simulacrum Add tidy check to detect empty files Addresses rust-lang#18439.
Addresses #18439.