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/libstd | |
| 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/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index d1ba9c267b7..f9fb392f9f5 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + use self::Entry::*; use hashbrown::hash_map as base; diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 1772879d013..04672da2b66 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Filesystem manipulation operations. //! //! This module contains basic methods to manipulate the contents of the local diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 1bbda9b5bcb..126bc3754da 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Cross-platform path manipulation. //! //! This module provides two types, [`PathBuf`] and [`Path`][`Path`] (akin to [`String`] diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 685c7909ff2..04353fde1b4 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -1,3 +1,5 @@ +// ignore-tidy-filelength + //! Multi-producer, single-consumer FIFO queue communication primitives. //! //! This module provides message-based communication over channels, concretely |
