Skip to content

CargoLicenceValidated

const CargoLicenceValidated: FilePolicyDefinition<CargoLicenceValidatedConfig>

Defined in: policies/CargoLicenceValidated.ts:53

A policy that validates the license field in Cargo.toml against the SPDX licence list. Supports auto-fixing correctable identifiers.

Cargo.toml uses a single license string field (not an array like Gleam’s licences). This policy validates that the value is a recognized SPDX identifier and can auto-fix common mistakes like wrong casing.