-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 should not check line lengths in UI tests #77548
Comments
We can add a check similar to https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/style.rs#L171 to disable just the line length limits for UI tests. |
Hey, first time contributor here happy to give this a shot! I think I get what's going on here, but do you have any pointers for where I should be looking exactly? |
I would add a "in_tests" check similar to the the under_rustfmt one here rust/src/tools/tidy/src/style.rs Line 171 in 8ae3b50
rust/src/tools/tidy/src/style.rs Line 229 in 8ae3b50
|
…imulacrum Tidy should not check line lengths in tests Tidy will not check line lengths in tests even without the `// ignore-tidy-linelength` annotations. This PR also removes all the annotations which are now unnecessary. Closes: rust-lang#77548
…imulacrum Tidy should not check line lengths in tests Tidy will not check line lengths in tests even without the `// ignore-tidy-linelength` annotations. This PR also removes all the annotations which are now unnecessary. Closes: rust-lang#77548
Is the plan suggested in #77675 (comment) still good?
|
@sjakobi yeah I'd say it is. #77675 actually did most of the work (adjusting tidy); someone just has to do the multi-stage landing process:
Step 3 is assuming that we truly want to keep that check. I personally think it is somewhat silly, but I assume it was added because people want it, so maybe we should keep it. |
@rustbot claim |
This is step 1 towards fixing rust-lang#77548. This commit includes the tidy change from rust-lang#77675. The "ignoring file length unnecessarily" check is temporarily disabled to simplify landing the ignore-rules. That check will be re-enabled in a follow-up PR.
…-Simulacrum tidy: Add ignore-rules for the line length check This is step 1 towards fixing rust-lang#77548. This PR contains the `tidy` change from rust-lang#77675. The "ignoring file length unnecessarily" check is temporarily disabled to simplify landing the ignore-rules. This check will be re-enabled in a follow-up PR.
This is step 2 towards fixing rust-lang#77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
…ions, r=Mark-Simulacrum Tests: Remove redundant `ignore-tidy-linelength` annotations This is step 2 towards fixing rust-lang#77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
…ions, r=Mark-Simulacrum Tests: Remove redundant `ignore-tidy-linelength` annotations This is step 2 towards fixing rust-lang#77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
tidy: Re-enable the "ignoring line length unnecessarily" check Closes rust-lang#77548.
@sjakobi thank you so much for pushing this through. :-) |
UI tests regularly have long lines due to the
//~ ERROR
annotations. So it is not very helpful for tidy to complain about overly long lines... every single time that happened, I ended up adding// ignore-tidy-linelength
(the amount of time it took me to figure out the exact way to do this went down from 3-5min the first time to <20s by now). To make test maintenance even more annoying, when an error message changes to become shorter, tidy will complain about the ignore flag being unnecessary! And each time the flag is added or removed, you need to re-bless the tests as line numbers change.This chore doesn't really seem worth it. We don't
rustfmt
the test suite either. Can we just disable the line length checker in the test suite please?The text was updated successfully, but these errors were encountered: