`cargo clippy` only produces output on the first run

323 Views Asked by At

I wanted to use Clippy to lint my code using Rust 1.31.1. I added a obvious mistake for the linker (and surely there is more to lint):

if (nr_children == 0) == true {...

I installed Clippy via rustup: rustup component add clippy (and clippy-preview as well).

When I run cargo clippy, I get no output, only Finished dev [unoptimized + debuginfo] target(s) in 0.00s .

When I clean the build with cargo clean before calling Clippy, I get the lint warnings, but when I then re-run cargo clippy, nothing happens. Even if I modify the code and save it before running cargo clippy, no output. However, simply touch-ing the file, triggers Clippy to produce the linting.

What am I doing wrong here?

0

There are 0 best solutions below