diff options
| author | bors <bors@rust-lang.org> | 2019-04-26 04:42:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-04-26 04:42:10 +0000 |
| commit | e8310a77143879ef0aa5ee4a0dffb4216390432b (patch) | |
| tree | 689f6e1bd0f3cdf5bb0fc1e681e4f9a4fe0d3f3b /src/libcore | |
| parent | 180edc21eeca50d0d597de091c8eb712667b5dd2 (diff) | |
| parent | 8c3068784c91a2be86b5ea0e5512290cb0e12481 (diff) | |
| download | rust-e8310a77143879ef0aa5ee4a0dffb4216390432b.tar.gz rust-e8310a77143879ef0aa5ee4a0dffb4216390432b.zip | |
Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasper
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. https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/60015#issuecomment-483868594. (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 https://github.com/rust-lang/rust/issues/60015).
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/num/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 2 | ||||
| -rw-r--r-- | src/libcore/slice/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 718222ee0f4..c1887a93490 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Numeric traits and functions for the built-in numeric types. #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index f05700a1db2..5d77b4dfbf7 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Manually manage memory through raw pointers. //! //! *[See also the pointer primitive types](../../std/primitive.pointer.html).* diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index bf3dda48dc7..8731f486753 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Slice management and manipulation. //! //! For more details see [`std::slice`]. diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 379c263c04c..7a5511ee1dc 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! String manipulation. //! //! For more details, see the `std::str` module. |
