Skip to content

Commit 99c04f9

Browse files
committed
fix: add mappings
1 parent 86d89ef commit 99c04f9

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

main.go

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -350,26 +350,39 @@ func normalizeLicense(license string) string {
350350

351351
// Check for known SPDX patterns (case-insensitive)
352352
replacements := map[string]string{
353-
"gpl-2": "GPL-2.0-only",
354-
"gpl-2+": "GPL-2.0-or-later",
355-
"gpl-3": "GPL-3.0-only",
356-
"gpl-3+": "GPL-3.0-or-later",
357-
"lgpl-2": "LGPL-2.0-only",
358-
"lgpl-2+": "LGPL-2.0-or-later",
359-
"lgpl-2.1": "LGPL-2.1-only",
360-
"lgpl-2.1+": "LGPL-2.1-or-later",
361-
"lgpl-3": "LGPL-3.0-only",
362-
"lgpl-3+": "LGPL-3.0-or-later",
363-
"apache-2": "Apache-2.0",
364-
"bsd": "BSD-3-Clause",
365-
"mit/x11": "MIT",
366-
"expat": "MIT", // Expat is the MIT license
367-
"mit-1": "MIT",
368-
"mit-style": "MIT",
369-
"psf": "Python-2.0",
370-
"public-domain": "NOASSERTION", // Not a license
371-
"openldap-2.8": "NOASSERTION", // Not in SPDX list
372-
"hylafax": "NOASSERTION", // Not in SPDX list
353+
"gpl-2": "GPL-2.0-only",
354+
"gpl-2+": "GPL-2.0-or-later",
355+
"gpl-3": "GPL-3.0-only",
356+
"gpl-3+": "GPL-3.0-or-later",
357+
"lgpl-2": "LGPL-2.0-only",
358+
"lgpl-2+": "LGPL-2.0-or-later",
359+
"lgpl-2.1": "LGPL-2.1-only",
360+
"lgpl-2.1+": "LGPL-2.1-or-later",
361+
"lgpl-3": "LGPL-3.0-only",
362+
"lgpl-3+": "LGPL-3.0-or-later",
363+
"apache-2": "Apache-2.0",
364+
"apache": "NOASSERTION", // Too generic without version
365+
"bsd": "BSD-3-Clause",
366+
"mit/x11": "MIT",
367+
"expat": "MIT", // Expat is the MIT license
368+
"mit-1": "MIT",
369+
"mit-style": "MIT",
370+
"psf": "Python-2.0",
371+
"public-domain": "NOASSERTION", // Not a license
372+
"openldap-2.8": "NOASSERTION", // Not in SPDX list
373+
"hylafax": "NOASSERTION", // Not in SPDX list
374+
"ubuntu-font-licence-1.0": "Ubuntu-Font-1.0",
375+
"go": "NOASSERTION", // Too generic
376+
"epl-1": "EPL-1.0",
377+
"dom4j": "NOASSERTION", // Not in SPDX list
378+
"fastcgi": "NOASSERTION", // Not in SPDX list
379+
"other": "NOASSERTION",
380+
"eclipse-public-license-v1.0": "EPL-1.0",
381+
"edl-1.0": "BSD-3-Clause", // EDL is BSD-like
382+
"nrl-2-clause": "NOASSERTION", // Not in SPDX list
383+
"tidy": "NOASSERTION",
384+
"purdue": "NOASSERTION",
385+
"mpl-2": "MPL-2.0",
373386
}
374387

375388
// Check for exact match first (case-insensitive)

0 commit comments

Comments
 (0)