Add a summary of lints caught in cargo clippy
#11532
Labels
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-clippy
Problem
When a relatively medium/large project migrates to clippy, there might be a large number of lint diagnostics. It can be difficult to get a clear picture of the category with the most problems.
@dclong raised an issue here describing this feature request in the clippy github repo.
Proposed Solution
It would help if running
cargo clippy
automatically shows counts of lints whenever a large number of diagnostics (> 10) are generated. For example, cargo clippy should show something likeAlthough the default behavior is to show this summary whenever the total amount of diagnostics is greater than 10, we should also allow users to override whether the summary is shown by running
cargo clippy --summary
orcargo clippy --no-summary
.Notes
Note that the summary includes both warnings generated from clippy and rustc.
The text was updated successfully, but these errors were encountered: