Skip to content

Commit

Permalink
Auto merge of #116477 - nnethercote:tidy-alpha-deps, r=wesleywiser
Browse files Browse the repository at this point in the history
Use tidy to enforce alphabetical dependency ordering

I get annoyed when dependencies in `Cargo.toml` files are not in alphabetical order. The [style guide](https://github.com/rust-lang/rust/blob/master/src/doc/style-guide/src/cargo.md) agrees with me.

There are ongoing efforts to provide linting/formatting of `Cargo.toml` files, e.g. rust-lang/rustfmt#5240, https://crates.io/crates/cargo-toml-lint, and https://github.com/TimonPost/cargo-toml-format. But it's far from clear what's the right approach.

So this PR does something very simple: it uses the order checking already present in tidy. This allows incremental application of ordering, starting right now, and avoiding the need for any kind of all-at-once conversion.

If we do end up using some more comprehensive `Cargo.toml` linting/formatting solution in the future, the `tidy-alphabetical` lines will be easy to remove.

r? `@wesleywiser`
  • Loading branch information
bors committed Oct 17, 2023
2 parents dff34d7 + c42d252 commit cf54bbb
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit cf54bbb

Please sign in to comment.