cargo-workspace-lints

Crates.iocargo-workspace-lints
lib.rscargo-workspace-lints
version
sourcesrc
created_at2023-12-05 22:47:46.055968+00
updated_at2025-01-22 20:21:34.030794+00
descriptionEnforce that all packages in a workspace are using workspace lints
homepage
repositoryhttps://github.com/JarredAllen/cargo-workspace-lints
max_upload_size
id1059401
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Jarred Allen (JarredAllen)

documentation

README

Enforce Package use Workspace Lints

Rust dropped a cool new feature in 1.74.0 that enables specifying levels for rustc and clippy lints in your workspace Cargo.toml file, and then the packages in your workspace can all inherit lints from the same source. However, each package in the workspace needs to include a lints.workspace = true line, or else it won't take those lints.

Enter cargo-workspace-lints! Once you install it, all you need to do is run cargo workspace-lints in your workspace, and it will check all the packages in your workspace.

For an example, you can use it on this crate! This crate is not a workspace, so it produces a nice error message:

$ cargo install cargo-workspace-lints --locked
...
$ git checkout https://github.com/JarredAllen/cargo-workspace-lints.git
$ cd cargo-workspace-lints
$ cargo workspace-lints
Failed to validate:
Failing packages:
* Package cargo-workspace-lints 0.1.0 (path+file://home/user/cargo-workspace-lints):
     No `workspace.lints` field found
$ echo $?
1

Run cargo workspace-lints --help for full details of the options with the command.

Commit count: 8

cargo fmt