The plan instead is to polish clippy and distribute it via rustup.
Yes, you can add new lints with an RfC. However, the bar for inclusion is very high.
I'm totally okay with the status quo, but I very much disagree that there is scope for uplifting lints to rustc from clippy with the current policies.
On one hand, I see how it is annoying when a compiler complains about code patterns that are not worth errors and could be false positives. OTOH, I feel like a language designed for safety should try to warn about as many bugs as possible. Would any of clippy's lints pass every Rust crate tested on Crater? Maybe those could be come rustc errors.
For fun:
Lint, a C Program Checker (1977)
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.1841
The separation of function between lint and the C compilers has both historical and practical rationale. The compilers turn C programs into executable files rapidly and efficiently. This is possible in part because the compilers do not do sophisticated type checking, especially between separately compiled programs. Lint takes a more global, leisurely view of the program, looking much more carefully at the compatibilities.lolnope
Well, there are lint-checking-lints, and there are very few linters out there, and clippy passes clippy, so those would pass. A couple other obscure lints that check for things that in practice never happen. Too obscure to be included in rustc I guess.
IMO a lint passing all of crater is a very good reason for it to not be included in rustc.
This is expressed pretty nicely, thank you. I was struggling to express this in my other comment. rustc has all the lints which:
- Everyone mostly agrees upon
- Have rare false positives
- Are of the kind you'd expect from a good compiler
It doesn't have 150 lints because 150 lints would be annoying, and would drown out the "important" lints. I work on clippy, and I find this distinction very useful. When rustc tells you to fix something, you fix it. Clippy lints help /inform/, and you may ignore them often. But you don't always need to listen to clippy. If I wrote a bot that fixed all rustc warnings I'm sure people would be fine with just blindly running it. I cannot say the same about clippy (not because of bugs), and that's a good thing.