Skip to content

Document Cargo.toml formatting #528

Closed
@NickLarsenNZ

Description

It is good to have consistent formatting for consistency between developers (eg: using rustfmt for ust code) to reduce noise around style in PR reviews.

Automatic formatting is a preference, however exising TOML formatters (as far as we know) apply rules across the whole toml file (and not only Cargo.toml), rather than different rules per section or use case of toml.

For example,

  • we would like [dependencies] to be ordered alphabetically
  • we would like important [project] attributes to be at the top of the section

So, for now we should document how we expect Cargo.toml to look, to avoid it repeatedly coming up in PRs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions