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

Ignore comments in tidy-filelength #87462

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

ibraheemdev
Copy link
Member

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 25, 2021
@petrochenkov
Copy link
Contributor

petrochenkov commented Jul 25, 2021

I disagree with this change, keeping comment lines short enough have the same value as keeping anything other text or code short.
We already have some logic in tidy applying exceptions to "special" comments like //~ ERROR text or comments containing URLs, which cannot be wrapped or shortened.

@ibraheemdev
Copy link
Member Author

ibraheemdev commented Jul 25, 2021

It's not just about being short, it's about readability. Comments don't add complexity to the file.

EDIT: I misinterpreted your comment as well 😄

@Mark-Simulacrum
Copy link
Member

Hm, @petrochenkov - I don't think this PR changes behavior for line length checking. Line lengths are already ignored for most of the codebase: we avoid nagging people in files under rustfmt control. Whether that was the right call, I'm not sure, but this PR seems unrelated to that topic.

This PR seems to solely intend to avoid nagging on long files if the length is primarily due to comment lines. I think that's an interesting proposal, but as I personally don't really typically find file length an impediment or good proxy, I'm not sure I'm the right reviewer.

Regardless, for issues like this I think it's likely best to circulate them more widely; I would suggest a T-compiler MCP.

Cc @rust-lang/libs-contributors as well, since many of our longer files are such due to extensive documentation in std, core, etc.

@petrochenkov
Copy link
Contributor

Ah, ok, sorry for misinterpreting the changes.
I'm ok with making files longer.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 1, 2021
@Mark-Simulacrum
Copy link
Member

Discussed during T-compiler meeting; no objections to just moving ahead were raised. Seems trivial to re-add if opposition is raised.

An additional point of discussion was the check might be dropped entirely, but that can also be proposed in the future with little trouble. It's possible being happier to ignore the lint is preferable, though, in cases where it is causing pain for no good reason.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 5, 2021

📌 Commit 3171bd5 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Aug 5, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 6, 2021
…-comment, r=Mark-Simulacrum

Ignore comments in tidy-filelength

Ref rust-lang#60302 (comment)
@bors
Copy link
Contributor

bors commented Aug 6, 2021

⌛ Testing commit 3171bd5 with merge 7129033...

@bors
Copy link
Contributor

bors commented Aug 6, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 7129033 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 6, 2021
@bors bors merged commit 7129033 into rust-lang:master Aug 6, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants