Skip to content

allow-unwrap-in-tests (etc) do not work for integration tests / examples / benches #13981

Open
@Manishearth

Description

@Manishearth

Clippy lets you do the following:

# Cargo.toml
[lints.clippy]
unwrap-used = true

# clippy.toml
allow-unwrap-in-tests = true

This stops code that is cfg(test) or #[test] from getting linted. However, this does not affect code in test/ (etc)., since that code isn't cfg(test).

is_in_test() probably should take that into account?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions