Description
I have a internal project (cannot share, unfortunately) with a series of lints defined in the lib.rs
, main.rs
, etc. Eg:
#![warn(
rust_2018_idioms,
nonstandard_style,
future_incompatible,
clippy::all,
clippy::restriction,
clippy::pedantic,
clippy::nursery
)]
I am attempting to get CI to fail when linting this project, via: cargo clippy -Z unstable-options -- --deny "warnings"
. However, clippy is printing warnings and not exiting.
Having recently struggled with Clippy and Caching (ala #4612) I even resorted to cargo clean && cargo clippy -Z unstable-options -- --deny "warnings"
, however clippy still prints warnings without failing.
Unfortunately I cannot seem to reproduce this issue in another crate; something I could post here as a reproduction. The same Rust & Clippy version in another crate, with the same #[warn(clippy::restriction)]
, is correctly failing on -D warnings
, where as my private crate is incorrectly not failing. My CI pipeline is currently running -D warnings
while printing warnings and not failing. This issue is not isolated to just my PC.
I'm seeking some advice here on how to debug this, and provide a reproducible bug report. Any thoughts are appreciated, thank you.
Meta
me ~/t/2/foo> cargo clippy -V
clippy 0.0.212 (5fd2f06e9 2020-05-31)
me ~/t/2/foo> rustc -Vv
rustc 1.45.0-nightly (5fd2f06e9 2020-05-31)
binary: rustc
commit-hash: 5fd2f06e99a985dd896684cb2c9f8c7090eca1ab
commit-date: 2020-05-31
host: x86_64-apple-darwin
release: 1.45.0-nightly
LLVM version: 10.0