This is a small command that takes a manifest as a single argument and checks if various fields are sorted. It returns 0 if all fields are sorted and 1 otherwise. This crate was created in response to an RFI here.
cargo install toml-sorted
toml-sorted /path/to/Cargo.toml
It currently checks the following fields in a manifest:
- [dependencies]
- [dev-dependencies]
- [build-dependencies]
- [workspace.members]
- [workspace.exclude]
MIT