Skip to content

test: compare _licenses bodies to SPDX plain text#1347

Open
Tarekchehahde wants to merge 2 commits into
github:gh-pagesfrom
Tarekchehahde:fix/spdx-plain-text-spec-636
Open

test: compare _licenses bodies to SPDX plain text#1347
Tarekchehahde wants to merge 2 commits into
github:gh-pagesfrom
Tarekchehahde:fix/spdx-plain-text-spec-636

Conversation

@Tarekchehahde

Copy link
Copy Markdown

Summary

Fixes #636.

Adds spec/spdx_plain_text_spec.rb to compare each _licenses/*.txt body (after YAML front matter) with the matching plain-text file from spdx/license-list-data.

  • Maps legacy SPDX IDs (e.g. GPL-3.0GPL-3.0-only) via SPDX_PLAIN_TEXT_ALIASES.
  • Must match: CC0-1.0, BlueOak-1.0.0 (verified byte-for-byte today).
  • Legacy mismatches: marked pending so CI stays green while existing drift is chipped away.
  • New licenses: must match SPDX plain text or the spec fails (per CONTRIBUTING).

Test plan

  • ./script/cibuild on Ruby 3.3.4 (GitHub Actions)

Made with Cursor

Add regression spec fetching license-list-data plain text for each
catalog entry. CC0-1.0 and BlueOak-1.0.0 must match; legacy
mismatches stay pending until aligned. New licenses must match SPDX
or the spec fails. Closes github#636.

CI: ./script/cibuild (Ruby 3.3.4 on GitHub Actions)
Co-authored-by: Cursor <cursoragent@cursor.com>
Support bilingual license files that append non-SPDX translations after
a separator (see github#1126) when comparing canonical English text.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test that license texts match SPDX plain license texts

1 participant