4 ms·
I guess the next stage would involve translating common non-idiomatic patterns into idiomatic Rust. Looks like this could be a job for a community-managed datab
by moosingin3space 10y ago
I guess the next stage would involve translating common non-idiomatic patterns into idiomatic Rust. Looks like this could be a job for a community-managed database!
- stcredzero 10y agoThis is best handled on a per-project or per-organization basis. I would have such a project concentrate on the tooling for maintaining and developing such databases.
- Manishearth 10y agoOn the rust subreddit someone tongue-in-cheek suggested `cargo clippy | rustfix` to be used in conjunction with this tool for better rust code. But that actually could work! Clippy has a ton of lints that make your code more idiomatic, and rustfix basically takes diagnostic output and applies suggestions (still WIP). Clippy is geared towards making human-written unidiomatic code better, so it might not catch some silly things in this tool's output but or certainly could be extended to do that.
- moosingin3space 10y agoI haven't used nightly much, what all does Clippy do?
- Manishearth 10y agoIt tells you about places where you can improve your code. Possible pitfalls, style issues, documentation issues, unidiomatic code, everything. Its a developer tool so you can use rustup to switch to nightly to run clippy (and use stable otherwise) and not impose nightly on the rest of the people who use the project. We have plans for making clippy a tool that you can fetch via rustup without requiring nightly.
- shepmaster 10y agoCheck out Clippy online! Go do http://play.integer32.com/ http://play.integer32.com/, paste in your code, click "Clippy".
- masklinn 10y agoIt's a linter.