-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: cargo tidy
#361
Comments
Hey @nrc, I like the idea of the command, but I'm not sure cargo-edit is the right place for it. The reason is it's probably won't reusing much code in cargo-edit and would be specific to PingCAP style guide. Let's see what @killercup thinks. |
It does use a fair bit of the Cargo edit code, mostly toml-edit, to be fair, but also the test infra. I don't think the styling has to be specific to PingCAP, the style guide is meant to be generally useful and I'm happy to discuss the rules here and update the style guide to match. |
I think this would be a good addition (and have it format by default maybe?) |
I could not find something already implemented, so I decided to write my own Cargo.toml formatter. |
Any update here? (actually just to bring up the topic! ;) ) |
We should probably coordinate with rustfmt on this. Their issue is rust-lang/rustfmt#4091 |
Closing in favor of rustfmt |
The Would you be open to accepting a PR that provides |
No. At this point, |
I found |
I would like to add a
cargo tidy
command. The purpose is to format Cargo.toml. For the kind of things I'd like to implement, see the PingCAP style guide.I have an initial implementation at https://github.com/nrc/cargo-edit/tree/tidy Currently it only sorts dependencies. I've used this already to produce this PR.
I know there is already
cargo add --sort
, but I want to be able to do this without adding a dep, and in the future I would like to extend it to support more formatting and linting.What do you think? Should I send a PR?
See also: #280
The text was updated successfully, but these errors were encountered: