Add more licenses, ignore 'trivial' items

This commit is contained in:
Pieter Vander Vennet 2022-12-22 04:24:46 +01:00
parent 6c5aef1aaa
commit ca11e793f4
3 changed files with 16 additions and 24 deletions

View file

@ -282,11 +282,16 @@ function main(args: string[]) {
let invalid = 0
for (const licenseInfo of licenseInfos) {
if(licenseInfo.sources.length + licenseInfo.authors.length == 0){
const isTrivial =
licenseInfo.license
.split(";")
.map((l) => l.trim().toLowerCase())
.indexOf("trivial") >= 0
if (licenseInfo.sources.length + licenseInfo.authors.length == 0 && !isTrivial) {
invalid++
invalidLicenses.push(
"Invalid license: No sources nor authors given in the license for " + JSON.stringify(licenseInfo)
"Invalid license: No sources nor authors given in the license for " +
JSON.stringify(licenseInfo)
)
continue
}