Skip to content

--cap-lints does not downgrade lint levels for subsequent lint control flags #75273

Open
@matthiaskrgr

Description

@matthiaskrgr

I order to silence all lints but one when using clippy, I can do something like cargo clippy -- -Aclippy::all -Wclippy::redundant_clone however this does not work when a crate denys clippy lints!

Thus I tried to override the lint level to warn with cargo clippy -- --cap-lints warn -Aclippy::all -Wclippy::redundant_clone but the -Aclippy.. -Wclippy.. flags do not affect messages that were forced from deny to warn with --cap-lints and the ex-deny-level lint warnings are still printed (as warning instead of error); filtering out undesired deny-messages completely did not work.
This looks like a bug.

rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
binary: rustc
commit-hash: 6c8927b0cf80ceee19386026cf9d7fd4fd9d486f
commit-date: 2020-07-26
host: x86_64-unknown-linux-gnu
release: 1.47.0-nightly
LLVM version: 10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions