3 ms·
This was initially the goal of clippy; but rustc has a policy of "no new lints", partially because clippy exists :) The plan instead is to polish clippy and di
by Manishearth 10y ago
This was initially the goal of clippy; but rustc has a policy of "no new lints", partially because clippy exists :)
The plan instead is to polish clippy and distribute it via rustup.
- steveklabnik 10y agoIt's "no new lints without an RFC." Some believe that this is equivalent to "no new lints", but the door isn't actually totally shut.
- Manishearth 10y agoPractically, it pretty much is. 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.
- cpeterso 10y agoWe've come full circle: C lint was created as a standalone program because C compilers were just about compiling code. :) 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.
- Manishearth 10y ago> Would any of clippy's lints pass every Rust crate tested on Crater? 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.