Skip to content

Add excessive_file_length lint#16760

Open
nickelser wants to merge 3 commits intorust-lang:masterfrom
nickelser:excessive-file-length
Open

Add excessive_file_length lint#16760
nickelser wants to merge 3 commits intorust-lang:masterfrom
nickelser:excessive-file-length

Conversation

@nickelser
Copy link
Copy Markdown

@nickelser nickelser commented Mar 25, 2026

Adds a new restriction lint that flags source files exceeding a configurable line count. Code lines only (no blanks/comments).

Supersedes #15922; tried to address feedback there.

changelog: new lint: [excessive_file_length]

Counts code lines only (via rustc_lexer), skipping comments and
blank lines. Configurable via excessive-file-length-threshold in
clippy.toml (default 500).

changelog: new lint: [`excessive_file_length`]
@rustbot rustbot added needs-fcp PRs that add, remove, or rename lints and need an FCP S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Mar 25, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 25, 2026

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

Lintcheck changes for 83597d3

Lint Added Removed Changed
clippy::excessive_file_length 413 0 0

This comment will be updated if you push new changes

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 28, 2026

☔ The latest upstream changes (possibly #16687) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp PRs that add, remove, or rename lints and need an FCP S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants