https://github.com/fuellabs/cargo-toml-lint
A linter for Cargo.toml files
https://github.com/fuellabs/cargo-toml-lint
Last synced: 8 months ago
JSON representation
A linter for Cargo.toml files
- Host: GitHub
- URL: https://github.com/fuellabs/cargo-toml-lint
- Owner: FuelLabs
- License: apache-2.0
- Created: 2022-02-14T06:08:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-09T12:09:08.000Z (almost 4 years ago)
- Last Synced: 2025-10-01T09:29:00.984Z (8 months ago)
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 7
- Watchers: 19
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `cargo-toml-lint` - a linter for `Cargo.toml`
[](https://github.com/FuelLabs/cargo-toml-lint/actions/workflows/ci.yml)
[](https://crates.io/crates/cargo-toml-lint)
[](https://discord.gg/xfpK4Pe)
Features:
* Verify toml syntax
* Run `cargo verify-project`
* Check that `[dependencies]` and `[dev-dependencies]` are sorted alphabetically
* Check that `[[test]]` are sorted by test name
* Check all members of top-level object arrays (like) `[[test]]` are placed contiguously
* Checks that the file ends with exactly one new line
* Checks that no line contains trailing whitespace
This is a best-effort linter. Currently custom parsing is really simplified, so it may:
* Reject some valid files if they are written in some particularly obscure way
* Accept some files that violate the given linting rules
However, any such issues are considered bugs and a fix PR would be appreciated.
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.