rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
11.25k stars 1.51k forks source link

[Tracking issue] Lints that are not grouped #11493

Open blyxyas opened 12 months ago

blyxyas commented 12 months ago

Currently, the lints that are not grouped are the following (got using a regex search for define_clippy_lint!)

This is just an index issue to be updated frequently, as frequent as a PR merging some of these into existing / new categories is merged. We can have a significant performance boost if these are merged just by sharing conditionals. Avoiding some allocations would also be a secondary benefit of merging these.

Pending group:

inherent_to_string & inherent_to_string_shadow_displayfunctions

Centri3 commented 12 months ago

We should disregard most of the restriction lints listed here unless they really cleanly fit into other groups (First thing that comes to mind that really wouldn't is pattern_type_mismatch). Once allowed lints aren't ran, having restriction lints in their own pass should be more efficient on its own

blyxyas commented 11 months ago

I just updated the list striking all restriction lints, a case-by-case selection can be done later.

J-ZhengLi commented 11 months ago

How about the inherent_to_string siblings: [inherent_to_string] and [inherent_to_string_shadow_display]? Which could be grouped into functions I think?