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

add cargofmt to clean up cargo.toml files #7

Open
gnunicorn opened this issue Mar 24, 2020 · 1 comment
Open

add cargofmt to clean up cargo.toml files #7

gnunicorn opened this issue Mar 24, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@gnunicorn
Copy link
Contributor

When editing cargo.toml files a few things happen that make the result a little unclean:

  • when updating the version, we sometimes have to add it and that leads to unclean spacing in inline-tables
  • the order of dependency attributes is mixed up, instead it should be fixed and deterministic – to allow for quicker parsing. We should think a bit about a good order, alphabetical might not be the best suited but something like : version, optional, default-features, features = , git, path ...

A new subcommand should enforce this formatting, potentially have a checking function that can be invoked as either "warn" or "error" on cargo unleash check.

@gnunicorn gnunicorn added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Mar 24, 2020
@gilescope
Copy link

One day it will come as standard ... rust-lang/rustfmt#4091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants