forked from MapComplete/MapComplete
Add more licenses, ignore 'trivial' items
This commit is contained in:
parent
6c5aef1aaa
commit
ca11e793f4
3 changed files with 16 additions and 24 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue