Today I learnt that clippy doesn't run on your tests by default! `cargo clippy --all-targets` will make lots of additional useful suggestions on your Rust code.
Related Posts
Today I learnt that `cargo fix` won't fix code with compiler errors by default, but you can override this!
$ cargo fix --broken-code --allow-dirty && cargo clippy --fix --allow-dirty
This incantation does exactly what I wanted :)
It's always seemed odd to me that the Rust stdlib is so lean (no random numbers, regex, HTTP) yet clippy is so big (correctness, performance, style preferences, even 'too many arguments').
Maybe it's because cargo is mature but clippy doesn't have an extension ecosystem?
I'm experimenting with live-evaluating tests in my programming language project.
It's relatively fiddly to hook up a UI for this, but it saves a precious keystroke to run the tests! I'm hoping that it results in more, better tests due to the convenience.