clap-rs/clap: a workspace block every crate should inherit
clap's root Cargo sets the license, edition, minimum Rust version, repository and lints once, and every member crate inherits them. A new crate with its own license would still pass CI. Five rules here check it, and every member passed.This config was written to test alint; clap doesn't use alint.
What alint found
- id: clap-member-license-inherits
kind: for_each_dir
select: "{clap_builder,clap_derive,clap_complete,clap_complete_nushell,clap_lex,clap_mangen,clap_bench}"
when_iter: 'iter.has_file("Cargo.toml")'
require:
- kind: toml_path_equals
paths: "{path}/Cargo.toml"
path: "$.package.license.workspace"
equals: true
level: error✓ passed clap-member-license-inherits
Every member inherits its license, edition, minimum Rust version, repository and lints from the workspace. Five rules check one field each.
extends:
- alint://bundled/oss-baseline@v1
- alint://bundled/ci/github-actions@v1 ℹ︎ info oss-security-policy-exists
There's no SECURITY, CODEOWNERS or code of conduct.
The bundled GitHub Actions rules (alint 0.16.1, on the workflows as of 7 May 2026) flag all 56 action references in the 9 workflows, which use a tag or branch, such as actions/, instead of a commit.
The config
clap is a small workspace: the clap crate at the root and seven members, such as clap_builder and clap_derive. The config checks the workspace block field by field, that every member inherits it, the crates.io fields each member publishes and the policy files, and keeps the minimum Rust version in step with CI. rustfmt, typos, cffconvert and cargo deny run from command_ rules, and commits get Conventional Commits and fixup checks.
- id: clap-msrv-coherent-across-ci
kind: cross_file_value_equals
source:
file: Cargo.toml
extract: { toml: "$.workspace.package['rust-version']" }
targets:
files: ".github/workflows/ci.yml"
extract: { regex: 'rust:\s*"(\d+\.\d+)"\s*#\s*MSRV' }
normalize: none
allow_missing_target: false
level: errorThe minimum Rust version is written in the workspace block and again in CI, next to an # MSRV comment. This rule keeps the two equal.
What stays outside alint
What the Rust toolchain does stays with it:
- building, testing and documenting the crates, and Clippy's lints;
- the license and advisory checks in
cargo deny, which the config runs but doesn't replace; - the regexes in
release's.toml pre-release-replacements, which should match the files they edit. alint has no rule that checks a regex against another file.