aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-spdx-licenses
AgeCommit message (Collapse)Author
2026-05-10refactor(clippy): deny clippy::unused_trait_namesnsfisis
2026-05-04fix(spdx-licenses): reject leading/trailing whitespace in validatensfisis
Composer anchors its license expression regex with `^...$`, but Mozart's parser tokenizer silently skipped edge whitespace, accepting inputs like " MIT" or "MIT\t". Mirror Composer by rejecting edge whitespace before parsing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04refactor(spdx-licenses): remove unused functionsnsfisis
2026-05-04feat(show): expand license output with name, OSI flag, and URLnsfisis
Mirror Composer's Command\ShowCommand::printLicenses(): emit one line per license identifier, expanded to "<full name> (<id>) [(OSI approved)] <url>" when the id is in the SPDX database, or just the id otherwise. The URL is built by mozart-spdx-licenses' new LicenseInfo::url() so the construction lives in the SPDX crate, like Composer's SpdxLicenses::getLicenseByIdentifier().
2026-05-04feat(validate): port ValidatingArrayLoader license checksnsfisis
Mirror Composer's Package\Loader\ValidatingArrayLoader::load() license block: warn on non-string/wrong-shape values, validate the SPDX expression with proprietary→MIT substitution, and surface "extra spaces" diagnostics. Validity is gated on the manifest's `time` field (checked only for releases without a date or within the last 8 days), mirroring Composer's strtotime('-8days') window.
2026-05-03refactor: switch internal maps/sets from HashMap to IndexMapnsfisis
Adopt indexmap workspace-wide so iteration order is deterministic and follows insertion order. The non-deterministic order of std HashMap otherwise leaks into resolver decisions when multiple valid solutions exist (e.g. cyclic require pairs under prefer-lowest), making behavior flaky and divergent from Composer's PHP-array semantics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-02-22chore: cargo fmtnsfisis
2026-02-22feat(spdx): add mozart-spdx-licenses crate for SPDX license validationnsfisis
Add new workspace crate that validates SPDX license expressions using data from composer/spdx-licenses (git submodule). Includes build.rs codegen from JSON, recursive descent expression parser supporting AND/OR/WITH/LicenseRef, and integrates into mozart-core's validate_license function. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>