Skip to content

allow-unwrap-in-tests = true has no effect in integration tests #10011

Closed
@daxpedda

Description

@daxpedda

Description

Using allow-unwrap-in-tests = true in clippy.toml has no effect in integration tests. clippy::unwrap_used will still lint there.

Since #9686 it's easy to workaround it, one can just put #![cfg(test)] at the top of the file.

Is this intended or is this considered a bug? Does Clippy have a way to detect it's seeing an integration test?

Version

rustc 1.67.0-nightly (c97b539e4 2022-11-30)
binary: rustc
commit-hash: c97b539e408ea353f4fde2f9251d598291fec421
commit-date: 2022-11-30
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions