Skip to content

Commit ba41a24

Browse files
committed
feat(spdx-utils)!: Remove simple license mappings without matching digits
In order to remove the already identified ambiguous mappings, stricten the check to require matching digits (disregarding trailing zeros) in keys and values for each mapping. This logic works for all ambiguous mappings except for `ALv2: Apache-2.0`, which is now accepted as being non-ambiguous because "2.0" is reduced to "2" which matches the digit in the key. Additionally, this logic identified 12 previously "Non-ambiguous mappings" to be in fact ambiguous because they have no or too little indication of a version. BREAKING CHANGE: Users who rely on the previous mappings need to create package curations with respective `declaredLicenseMapping`s. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 23a177b commit ba41a24

24 files changed

+102
-159
lines changed

plugins/package-managers/cocoapods/src/funTest/assets/projects/synthetic/version-resolution-expected-output.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,8 @@ packages:
508508
declared_licenses:
509509
- "BSD"
510510
declared_licenses_processed:
511-
spdx_expression: "BSD-3-Clause"
512-
mapped:
513-
BSD: "BSD-3-Clause"
511+
unmapped:
512+
- "BSD"
514513
description: "Methods to allow using HTML code with CoreText."
515514
homepage_url: "https://github.com/Cocoanetics/DTCoreText"
516515
binary_artifact:
@@ -538,9 +537,8 @@ packages:
538537
declared_licenses:
539538
- "BSD"
540539
declared_licenses_processed:
541-
spdx_expression: "BSD-3-Clause"
542-
mapped:
543-
BSD: "BSD-3-Clause"
540+
unmapped:
541+
- "BSD"
544542
description: "Methods to allow using HTML code with CoreText."
545543
homepage_url: "https://github.com/Cocoanetics/DTCoreText"
546544
binary_artifact:
@@ -568,9 +566,8 @@ packages:
568566
declared_licenses:
569567
- "BSD"
570568
declared_licenses_processed:
571-
spdx_expression: "BSD-3-Clause"
572-
mapped:
573-
BSD: "BSD-3-Clause"
569+
unmapped:
570+
- "BSD"
574571
description: "Standard toolset classes and categories."
575572
homepage_url: "https://github.com/Cocoanetics/DTFoundation"
576573
binary_artifact:
@@ -598,9 +595,8 @@ packages:
598595
declared_licenses:
599596
- "BSD"
600597
declared_licenses_processed:
601-
spdx_expression: "BSD-3-Clause"
602-
mapped:
603-
BSD: "BSD-3-Clause"
598+
unmapped:
599+
- "BSD"
604600
description: "Standard toolset classes and categories."
605601
homepage_url: "https://github.com/Cocoanetics/DTFoundation"
606602
binary_artifact:
@@ -628,9 +624,8 @@ packages:
628624
declared_licenses:
629625
- "BSD"
630626
declared_licenses_processed:
631-
spdx_expression: "BSD-3-Clause"
632-
mapped:
633-
BSD: "BSD-3-Clause"
627+
unmapped:
628+
- "BSD"
634629
description: "Standard toolset classes and categories."
635630
homepage_url: "https://github.com/Cocoanetics/DTFoundation"
636631
binary_artifact:
@@ -658,9 +653,8 @@ packages:
658653
declared_licenses:
659654
- "BSD"
660655
declared_licenses_processed:
661-
spdx_expression: "BSD-3-Clause"
662-
mapped:
663-
BSD: "BSD-3-Clause"
656+
unmapped:
657+
- "BSD"
664658
description: "Standard toolset classes and categories."
665659
homepage_url: "https://github.com/Cocoanetics/DTFoundation"
666660
binary_artifact:
@@ -716,9 +710,8 @@ packages:
716710
declared_licenses:
717711
- "BSD"
718712
declared_licenses_processed:
719-
spdx_expression: "BSD-3-Clause"
720-
mapped:
721-
BSD: "BSD-3-Clause"
713+
unmapped:
714+
- "BSD"
722715
description: "A set of in-app debugging and exploration tools for iOS"
723716
homepage_url: "https://github.com/Flipboard/FLEX"
724717
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm/node-modules-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,8 @@ packages:
300300
declared_licenses:
301301
- "BSD-like"
302302
declared_licenses_processed:
303-
spdx_expression: "BSD-3-Clause"
304-
mapped:
305-
BSD-like: "BSD-3-Clause"
303+
unmapped:
304+
- "BSD-like"
306305
description: "a CSS selector compiler/engine"
307306
homepage_url: "https://github.com/fb55/css-select#readme"
308307
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm/project-with-lockfile-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,8 @@ packages:
311311
declared_licenses:
312312
- "BSD-like"
313313
declared_licenses_processed:
314-
spdx_expression: "BSD-3-Clause"
315-
mapped:
316-
BSD-like: "BSD-3-Clause"
314+
unmapped:
315+
- "BSD-like"
317316
description: "a CSS selector compiler/engine"
318317
homepage_url: "https://github.com/fb55/css-select#readme"
319318
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm/shrinkwrap-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,8 @@ packages:
300300
declared_licenses:
301301
- "BSD-like"
302302
declared_licenses_processed:
303-
spdx_expression: "BSD-3-Clause"
304-
mapped:
305-
BSD-like: "BSD-3-Clause"
303+
unmapped:
304+
- "BSD-like"
306305
description: "a CSS selector compiler/engine"
307306
homepage_url: "https://github.com/fb55/css-select#readme"
308307
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/npm/shrinkwrap-skip-excluded-scopes-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ packages:
172172
declared_licenses:
173173
- "BSD-like"
174174
declared_licenses_processed:
175-
spdx_expression: "BSD-3-Clause"
176-
mapped:
177-
BSD-like: "BSD-3-Clause"
175+
unmapped:
176+
- "BSD-like"
178177
description: "a CSS selector compiler/engine"
179178
homepage_url: "https://github.com/fb55/css-select#readme"
180179
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/pnpm/nested-project-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,8 @@ packages:
335335
declared_licenses:
336336
- "BSD-like"
337337
declared_licenses_processed:
338-
spdx_expression: "BSD-3-Clause"
339-
mapped:
340-
BSD-like: "BSD-3-Clause"
338+
unmapped:
339+
- "BSD-like"
341340
description: "a CSS selector compiler/engine"
342341
homepage_url: "https://github.com/fb55/css-select#readme"
343342
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/pnpm/project-with-lockfile-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,8 @@ packages:
311311
declared_licenses:
312312
- "BSD-like"
313313
declared_licenses_processed:
314-
spdx_expression: "BSD-3-Clause"
315-
mapped:
316-
BSD-like: "BSD-3-Clause"
314+
unmapped:
315+
- "BSD-like"
317316
description: "a CSS selector compiler/engine"
318317
homepage_url: "https://github.com/fb55/css-select#readme"
319318
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/pnpm/project-with-lockfile-skip-excluded-scopes-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ packages:
174174
declared_licenses:
175175
- "BSD-like"
176176
declared_licenses_processed:
177-
spdx_expression: "BSD-3-Clause"
178-
mapped:
179-
BSD-like: "BSD-3-Clause"
177+
unmapped:
178+
- "BSD-like"
180179
description: "a CSS selector compiler/engine"
181180
homepage_url: "https://github.com/fb55/css-select#readme"
182181
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/yarn/project-with-lockfile-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,8 @@ packages:
311311
declared_licenses:
312312
- "BSD-like"
313313
declared_licenses_processed:
314-
spdx_expression: "BSD-3-Clause"
315-
mapped:
316-
BSD-like: "BSD-3-Clause"
314+
unmapped:
315+
- "BSD-like"
317316
description: "a CSS selector compiler/engine"
318317
homepage_url: "https://github.com/fb55/css-select#readme"
319318
binary_artifact:

plugins/package-managers/node/src/funTest/assets/projects/synthetic/yarn/project-with-lockfile-skip-excluded-scopes-expected-output.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ packages:
174174
declared_licenses:
175175
- "BSD-like"
176176
declared_licenses_processed:
177-
spdx_expression: "BSD-3-Clause"
178-
mapped:
179-
BSD-like: "BSD-3-Clause"
177+
unmapped:
178+
- "BSD-like"
180179
description: "a CSS selector compiler/engine"
181180
homepage_url: "https://github.com/fb55/css-select#readme"
182181
binary_artifact:

0 commit comments

Comments
 (0)