Skip to content

Commit b922c7d

Browse files
committed
feat(spdx-utils)!: Remove tolerating trailing zero differences
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent ba5e1b8 commit b922c7d

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

utils/spdx/src/main/resources/simple-license-mapping.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,22 @@
2323
---
2424

2525
AFLv2.1: AFL-2.1
26-
ALv2: Apache-2.0
27-
APACHEv2: Apache-2.0
28-
APL2: Apache-2.0
2926
APLv2.0: Apache-2.0
30-
Apache-2: Apache-2.0
3127
Apache2.0: Apache-2.0
32-
Apache2: Apache-2.0
3328
BSD-3: BSD-3-Clause
3429
BSD2: BSD-2-Clause
3530
BSD3: BSD-3-Clause
3631
Bouncy: MIT
3732
EDL-1.0: BSD-3-Clause
3833
FreeBSD: BSD-2-Clause-Views
39-
GPL-2: GPL-2.0-only
40-
GPL2: GPL-2.0-only
41-
GPLv2+: GPL-2.0-or-later
42-
GPLv2: GPL-2.0-only
43-
GPLv3+: GPL-3.0-or-later
44-
GPLv3: GPL-3.0-only
4534
ISCL: ISC
46-
LGPL-3: LGPL-3.0-only
47-
LGPL3: LGPL-3.0-only
48-
LGPLv3+: LGPL-3.0-or-later
49-
LGPLv3: LGPL-3.0-only
5035
MIT-like: MIT
5136
MIT-style: MIT
5237
MPLv2.0: MPL-2.0
53-
MPLv2: MPL-2.0
54-
PSF2: PSF-2.0
5538
UNLICENSED: Unlicense
5639
Unlicence: Unlicense
57-
afl-2: AFL-2.0
5840
afl2.0: AFL-2.0
5941
afl2.1: AFL-2.1
60-
afl2: AFL-2.0
6142
bouncy-license: MIT
6243
bsl1.0: BSL-1.0
6344
cddl1.0: CDDL-1.0
@@ -67,12 +48,9 @@ epl2.0: EPL-2.0
6748
eupl1.0: EUPL-1.0
6849
eupl1.1: EUPL-1.1
6950
eupl1.2: EUPL-1.2
70-
gpl3: GPL-3.0-only
7151
isc-license: ISC
7252
mit-license: MIT
7353
mit-licensed: MIT
74-
mpl-2: MPL-2.0
7554
mpl2.0: MPL-2.0
76-
mpl2: MPL-2.0
7755
w3cl: W3C
7856
wtf: WTFPL

utils/spdx/src/test/kotlin/SpdxSimpleLicenseMappingTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class SpdxSimpleLicenseMappingTest : WordSpec({
5858
}
5959
}
6060

61-
"contain equal digits omitting trailing zeros" {
61+
"contain equal digits" {
6262
val exceptions = mapOf(
6363
// See https://www.eclipse.org/org/documents/edl-v10.php.
6464
"EDL-1.0" to SpdxLicense.BSD_3_CLAUSE,
@@ -69,8 +69,8 @@ class SpdxSimpleLicenseMappingTest : WordSpec({
6969
SpdxSimpleLicenseMapping.simpleLicenseMapping.filterNot {
7070
it in exceptions.entries
7171
}.forAll { (key, license) ->
72-
val digitsInKey = key.filter { it.isDigit() }.dropLastWhile { it == '0' }
73-
val digitsInLicense = license.id.filter { it.isDigit() }.dropLastWhile { it == '0' }
72+
val digitsInKey = key.filter { it.isDigit() }
73+
val digitsInLicense = license.id.filter { it.isDigit() }
7474
digitsInKey shouldBe digitsInLicense
7575
}
7676
}

0 commit comments

Comments
 (0)