Skip to content
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

Support cargo sort subcommand ? #728

Closed
baoyachi opened this issue Jul 14, 2022 · 2 comments
Closed

Support cargo sort subcommand ? #728

baoyachi opened this issue Jul 14, 2022 · 2 comments

Comments

@baoyachi
Copy link

In rust project, sometimes want add new crate, Without constraints, there will be problems that many developers fill in casually. Does this project provide the function of sorting the name of crate. E.g:

~~ cargo sort  [OPTIONS]
@epage
Copy link
Collaborator

epage commented Jul 14, 2022

cargo add will preserve existing sorting but manual edits could mess that up.

When I removed the --sort flag from cargo add, I had done so with the idea that a manifest formatting command could exist. In addition to sorting, it could adjust whitespace, table ordering, field ordering, etc.

Whether that belongs in cargo fmt or in a separate command, I am unsure. The conversation on that could be different both short-term and long-term.

@epage
Copy link
Collaborator

epage commented Jul 14, 2022

I had missed that we had an issue for this already, #361

@epage epage closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants