Skip to content

How to make Clippy fail on warnings, but keep warnings printed as warnings? #11942

Closed Answered by flip1995
laniakea64 asked this question in Q&A
Discussion options

You must be logged in to vote

If you specify deny(warnings) or -Dwarnings you tell the Rust compiler (or Clippy) that you want to fail compilation on warnings. That's exactly what this flag (or attribute) means.

cargo build and cargo run are handled in other justfile recipes

In that case, you might want to set -Dwarnings in only the Justfile where you want to fail on warnings and not in those where you don't.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@laniakea64
Comment options

@flip1995
Comment options

Answer selected by laniakea64
Comment options

You must be logged in to vote
2 replies
@flip1995
Comment options

@laniakea64
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants