-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Warn when ignore-tidy-linelength is present, but no lines are too long #60169
Warn when ignore-tidy-linelength is present, but no lines are too long #60169
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @kennytm |
6a6400a
to
1da5d9d
Compare
r=me after Travis passes. |
This kind of logic is applicable to all tidy rules.
|
☔ The latest upstream changes (presumably #60168) made this pull request unmergeable. Please resolve the merge conflicts. |
25fb915
to
c2895a5
Compare
@kennytm: I've updated the PR to also warn when other tidy ignore directives are present, but have no effect. Could you check to make sure the changes are still okay? |
@bors r+ |
📌 Commit c2895a5 has been approved by |
…ine, r=kennytm Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
@bors r- This PR failed in the rollup #60189, because #60172 has accidentally removed the CRLF line endings from src/test/run-pass/issues/issue-16278.rs (see #16278). They need to be added back. (Congratulations in detecting a regression? 🙃) |
c2895a5
to
5ab5806
Compare
@bors r=kennytm |
📌 Commit 5ab5806 has been approved by |
…ine, r=kennytm Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
…ine, r=kennytm Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
…ine, r=kennytm Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
…ine, r=kennytm Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
Rollup of 6 pull requests Successful merges: - #59823 ([wg-async-await] Drop `async fn` arguments in async block ) - #59839 (Warn on unused results for operation methods on nums) - #60146 (Update fonts used by rustdoc) - #60169 (Warn when ignore-tidy-linelength is present, but no lines are too long) - #60177 (Promote rust comments to rustdoc) - #60191 (Add f16c target_feature) Failed merges: r? @ghost
It's easy for a
// ignore-tidy-linelength
to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces// ignore-tidy-linelength
to be used exactly when necessary, to make sure such changes are intentional.