Uh oh!
There was an error while loading. Please reload this page.
Add a tidy check for files with over 3,000 lines - #60167
Conversation
rust-highfive
commented
Apr 22, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
varkor
commented
Apr 22, 2019
cc @rust-lang/compiler to check this is something we actually want to do. |
estebank
commented
Apr 22, 2019
Let's make sure the error has a blurb about how to disable the check (that way feature work that barely pushes a file over the edge is not stopped, but the signal is sent that the file needs restructuring). |
Centril
commented
Apr 22, 2019
This seems like an extremely awesome PR and necessary to improve the quality of rustc. In particular, the easy way to disable the check for a file provides a way for us to incrementally improve things and find the problematic files quickly. |
This comment has been minimized.
This comment has been minimized.
matthewjasper
commented
Apr 23, 2019
r=me once the compiler team is happy with this. |
bors
commented
Apr 23, 2019
☔ The latest upstream changes (presumably #60211) made this pull request unmergeable. Please resolve the merge conflicts. |
varkor
commented
Apr 24, 2019
Let's very quickly check everyone's happy with this in tomorrow's meeting. |
Centril
commented
Apr 25, 2019
The consensus from the T-compiler meeting seems to be that everyone's happy with this. |
varkor
commented
Apr 25, 2019
@bors r=matthewjasper |
bors
commented
Apr 25, 2019
📌 Commit 8c30687 has been approved by |
bors
commented
Apr 26, 2019
Add a tidy check for files with over 3,000 lines Files with a large number of lines can cause issues in GitHub (e.g. #60015) and also tend to be indicative of opportunities to refactor into less monolithic structures. This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in #60015 (comment). (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with `// ignore-tidy-filelength`. Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in #60015).
bors
commented
Apr 26, 2019
☀️ Test successful - checks-travis, status-appveyor |
Files with a large number of lines can cause issues in GitHub (e.g. #60015) and also tend to be indicative of opportunities to refactor into less monolithic structures.
This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in #60015 (comment). (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with
// ignore-tidy-filelength.Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in #60015).