Enabling clippy lint globally, but disabling it in test modules

⚓ rust    📅 2025-05-26    👤 surdeus    👁️ 5      

surdeus

Warning

This post was published 33 days ago. The information described in this article may have changed.

At the root of my project I have

#![warn(clippy::as_conversions)]
#![warn(clippy::unwrap_used)]

And while this is useful, in almost every single test module I have to manually disable those warnings again. Would be nice if there was a simple global solution I could specify somewhere in Cargo.toml to skip doing this for tests.

6 posts - 4 participants

Read full topic

🏷️ rust_feed