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

tidy: fire less "ignoring file length unneccessarily" warnings #94178

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

est31
Copy link
Member

@est31 est31 commented Feb 20, 2022

This avoids a situation where a file is at the border of the limit,
and alternates between hitting the limit and not hitting it, causing
a back and forth of addition of the ignore-tidy-linelength directive.

As an example, consider the ignore-tidy-filelength of compiler/rustc_typeck/src/collect.rs.

It was added in 2ca4964, removed in
37354eb (a revert of the earlier commit), added again in 448d076,
removed in 3171bd5, added in 438826f,
and removed in bb0a2f9.

To avoid this back and forth, we exempt files from the unneccessary
ignoring warning that have length of at least 70% of the limit.

This avoids a situation where a file is at the border of the limit,
and alternates between hitting the limit and not hitting it, causing
a back and forth of addition of the ignore-tidy-linelength directive.

As an example, consider the ignore-tidy-filelength of compiler/rustc_typeck/src/collect.rs.

It was added in 2ca4964, removed in
37354eb, added again in 448d076,
removed in 3171bd5, added in 438826f,
and rust-lang#94142 is going to remove it again.

To avoid this back and forth, we exempt files from the unneccessary
ignoring warning that have length of at least 70% of the limit.
@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 Feb 20, 2022
@Mark-Simulacrum
Copy link
Member

I agree this largely makes sense -- not sure about 70% being the margin, but seems ok to start.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 21, 2022

📌 Commit 49a5456 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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 21, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 22, 2022
…Simulacrum

tidy: fire less "ignoring file length unneccessarily" warnings

This avoids a situation where a file is at the border of the limit,
and alternates between hitting the limit and not hitting it, causing
a back and forth of addition of the ignore-tidy-linelength directive.

As an example, consider the ignore-tidy-filelength of compiler/rustc_typeck/src/collect.rs.

It was added in 2ca4964, removed in
37354eb (a revert of the earlier commit), added again in 448d076,
removed in 3171bd5, added in 438826f,
and removed in bb0a2f9.

To avoid this back and forth, we exempt files from the unneccessary
ignoring warning that have length of at least 70% of the limit.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#94169 (Fix several asm! related issues)
 - rust-lang#94178 (tidy: fire less "ignoring file length unneccessarily" warnings)
 - rust-lang#94179 (solarish current_exe using libc call directly)
 - rust-lang#94196 (compiletest: Print process output info with less whitespace)
 - rust-lang#94208 (Add the let else tests found missing in the stabilization report)
 - rust-lang#94237 (Do not suggest wrapping an item if it has ambiguous un-imported methods)
 - rust-lang#94246 (ScalarMaybeUninit is explicitly hexadecimal in its formatting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a53b604 into rust-lang:master Feb 22, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants