rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
11.28k stars 1.52k forks source link

Specify whether false-positives are expected in docs #2680

Open rcoh opened 6 years ago

rcoh commented 6 years ago

I've run into lints that are false positives on clippy, but I've been unsure if they're expected or not. I think it would be helpful if the lints in the clippy collection (that are expected no false positives) showed something like:

We expected this lint, `lint_name_here` to have no false positives. If you found one, please report it! https://...../issues/false-positive-template

This could be both in the online docs (perhaps a label/button: No false positives. Found One? in the header line of the lint), as well as in the command line output.

Happy to make the changes if people are amenable.

oli-obk commented 6 years ago

Currently we assume that any lints which don't state that they have false positives, don't have false positives. But we could state that in the docs, indeed.

Essentially everywhere where the docs say None, we could paste the text you mentioned along with the hyperlink. Bonus points for doing that via the python script, so we can still just write None