Skip to content
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

Merged
merged 1 commit into from
May 13, 2017
Merged

Add tidy check to detect empty files #41935

merged 1 commit into from
May 13, 2017

Conversation

iKevinY
Copy link
Contributor

@iKevinY iKevinY commented May 12, 2017

Addresses #18439.

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@iKevinY
Copy link
Contributor Author

iKevinY commented May 12, 2017

r? @Mark-Simulacrum


if contents.is_empty() {
tidy_error!(bad, "{}: empty file", file.display());
return
Copy link
Member

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.

Copy link
Contributor Author

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.

@shepmaster shepmaster added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 12, 2017
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 12, 2017

📌 Commit 99bca6e has been approved by Mark-Simulacrum

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request May 13, 2017
…Simulacrum

Add tidy check to detect empty files

Addresses rust-lang#18439.
bors added a commit that referenced this pull request May 13, 2017
@bors bors merged commit 99bca6e into rust-lang:master May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants