Skip to content

clippy --keep-going #15599

Open
Open
@kaleidawave

Description

@kaleidawave

Problem

I have a workspace with a few crates that internally depend on each other. If I make a change across crates (or update clippy lints) I want to see all the lint failings across the workspace.

Currently running clippy --keep-going, the --keep-going flag seems to have no effect, with it stopping at $crate1 without checking $crate2 etc

I would prefer not to merge errors into warnings and have them mix

error: could not compile $crate1 (lib) due to 3 previous errors; 47 warnings emitted.

The problem is the reason is pedantic lint clippy::redundant_closure (which is an error under our configuration) being thrown. While this is an error in our setup it should still allow compilation (could not compile should not be raised).

Proposed Solution

I do not know whether clippy discerns between compilation errors and lint errors. If clippy say returned the exit code 3 for compilation and exit code 4 for a lint error, then cargo could continue running clippy on other workspace members if the exit code is 3?

Notes

rust-lang/rust-clippy#1707 and https://users.rust-lang.org/t/keep-going-with-cargo-clippy/106020/4 sort of discuss this

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions