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

chore: support Cargo.toml format check #481

Merged
merged 5 commits into from
Dec 14, 2022

Conversation

ShiKaiWi
Copy link
Member

@ShiKaiWi ShiKaiWi commented Dec 13, 2022

Which issue does this PR close?

Closes #

Rationale for this change

Currently, all the Cargo.tomls in the workspace has no linter check, leading to some kinds of mess in these tomls.

What changes are included in this PR?

  • Introduce the cargo-sort dev dependency;
  • Impose the format check on all the Cargo.tomls in the workspace;

Are there any user-facing changes?

None.

How does this change test

By existing CI.

Additional

Currently, the cargo sort doesn't support such syntax:

[package]
version.workspace = true
authors.workspace = true
edition.workspace = true

So this PR change such block into:

[package.version]
workspace = true

[package.authors]
workspace = true

[package.edition]
workspace = true

Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rachelint Rachelint merged commit a82dfc3 into apache:main Dec 14, 2022
@ShiKaiWi ShiKaiWi deleted the chore-format-cargo-toml branch December 14, 2022 05:31
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* chore: support Cargo.toml format check

* chore: remove the reference link

* chore: run clippy before cargo fmt

* chore: format all the Cargo.toml s

* chore: format Cargo.toml for object_store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants