4 ms·
> I can't remember seeing a compiler tell me "maybe try this instead?" What is next? Clippy? [1] [1] https://en.wikipedia.org/wiki/Office_Assistant https://e
by amelius 10y ago
> I can't remember seeing a compiler tell me "maybe try this instead?"
What is next? Clippy? [1]
[1] https://en.wikipedia.org/wiki/Office_Assistant https://en.wikipedia.org/wiki/Office_Assistant
- steveklabnik 10y agohttps://github.com/Manishearth/rust-clippy https://github.com/Manishearth/rust-clippy
- cpeterso 10y agoHave any Clippy warnings be added to rustc? Many of them look like real bugs that would benefit more people if included in rustc itself.
- steveklabnik 10y agoNot yet. Adding warnings is tough; some part of the ecosystem compiles with "warnings == errors", and so adding new lints can cause ecosystem breakage.
- lifthrasiir 10y agoAnd not to mention that "soft" warnings not included to the list would essentially have the same problem as `-Wall` vs. `-Weverything`. wink
- chrismorgan 10y agoCrates.io should have a check for things that get published to it that objects if you try to upload something with `#![deny(warnings)]` on the crate. It’s fine for your own code, but production libraries should never use it.
- GolDDranks 10y agoThe joke's on you: Clippy – A bunch of lints to catch common mistakes and improve your Rust code https://github.com/Manishearth/rust-clippy https://github.com/Manishearth/rust-clippy
- speedkills 10y agoThere are multiple clippy implementations and they are pretty helpful. https://github.com/softwaremill/scala-clippy https://github.com/softwaremill/scala-clippy