Error reading Clippy's configuration file when allow-panic-in-tests
is included in the file
#13112
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Uh oh!
There was an error while loading. Please reload this page.
Summary
I want to be able to prevent calls to
panic!
in all code in my project, except in tests, usingallow-panic-in-tests
. However, when I addallow-panic-in-tests=true
in myclippy.toml
, I get this error: "error reading Clippy's configuration file: unknown fieldallow-panic-in-tests
".Lint Name
clippy::panic
Reproducer
I start a new project with:
cargo new --lib clippy-panic-in-test cd clippy-panic-in-test
I replaced the contents of
src/lib.rs
with this code:I've configured Clippy by creating
clippy.toml
with:I saw this happen:
I expected Clippy to not raise any errors, as
allow-panic-in-tests
is documented as supported here.Version
Clippy version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: