How to run Clippy on a specific example

cargo clippy --example xyz 

gives warnings in the whole crate (src/*). I just want it to provide lint warnings for just the example/xyz.rs. If that's not possible is there a way to make clippy emit all the warnings without aborting after emitting some?

To prevent clippy from aborting, you'd have to allow lints that are errors.

cargo clippy -- --warn clippy::all

changes all lints to warnings.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.