Skip to content

Commit ef0e179

Browse files
iunanuahoolioh
authored andcommitted
Check licenses csv column number (#37)
* Check licenses csv columns number * Warn only
1 parent a24f8ca commit ef0e179

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/check_licenses.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ const licenses = {
2222
file: new Set()
2323
}
2424

25+
/* eslint-disable no-console */
2526
for (let i = 0; i < csvLines.length; i++) {
2627
const line = csvLines[i]
2728
if (index !== 0) {
2829
const columns = line.split(',')
2930
const type = columns[0]
3031
const license = columns[1]
32+
if (columns.length > 4) {
33+
console.log(`Too many columns in line: ${line}`)
34+
}
3135
if (type && license) {
3236
licenses[type].add(license)
3337
}
@@ -42,8 +46,6 @@ if (!requiresOk || !devOk) {
4246
}
4347

4448
function checkLicenses (typeDeps, type) {
45-
/* eslint-disable no-console */
46-
4749
const missing = []
4850
const extraneous = []
4951

0 commit comments

Comments
 (0)