Skip to content

[Clippy] Add clippy to CI, allow current violations at a module level#1280

Open
DanielEScherzer wants to merge 1 commit into
rust-lang:mainfrom
DanielEScherzer:clippy-ci
Open

[Clippy] Add clippy to CI, allow current violations at a module level#1280
DanielEScherzer wants to merge 1 commit into
rust-lang:mainfrom
DanielEScherzer:clippy-ci

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Contributor

Add clippy to CI so that future changes do not increase the number of violations. The existing violations are allowlisted on a module level (i.e. at the top of files with inner attributes, or above the start of nested inline test modules with outer attributes).

CI runs clippy on both Window and Linux because some lints may fire on one but not the other; see, e.g. #1238.

Existing violations will be addressed in subsequent pull requests.

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Jun 15, 2026
@DanielEScherzer DanielEScherzer force-pushed the clippy-ci branch 2 times, most recently from 2b090f2 to 134e953 Compare June 15, 2026 17:48
Comment thread src/build.rs
}

#[cfg(test)]
#[allow(clippy::needless_borrow)]

@weihanglo weihanglo Jun 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add these allow to [lints.clippy] table?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make it clear where the existing violations were so that it would be clear what needs fixing, and so that we don't introduce more warnings in other files. If this is merged (or if you expect to merge this soon) I can start sending the PRs to fix the violations and remove the allowing

@DanielEScherzer DanielEScherzer force-pushed the clippy-ci branch 2 times, most recently from 644741f to b2dd5cd Compare June 15, 2026 18:08
Add clippy to CI so that future changes do not increase the number of
violations. The existing violations are allowlisted on a module level (i.e. at
the top of files with inner attributes, or above the start of nested inline
test modules with outer attributes).

CI runs clippy on both Window and Linux because some lints may fire on one but
not the other; see, e.g. rust-lang#1238.

Existing violations will be addressed in subsequent pull requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Waiting on review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants