Skip to content

Commit

Permalink
tools/license.sh: recognize Python-2.0 and [email protected], and cor…
Browse files Browse the repository at this point in the history
…rect yarn.lock

* Python-2.0 is a notice type license
  https://www.npmjs.com/package/argparse

* We updated to [email protected] https://go-review.googlesource.com/c/vscode-go/+/369740

https://www.npmjs.com/package/json-schema: Code is licensed under the AFL or BSD 3-Clause license.

Both AFL and BSD 3-Clause are notice type.

Change-Id: I6275c18339fcdf3f78d06871989aee61d74176bb
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/370656
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Trust: Nooras Saba‎ <[email protected]>
Reviewed-by: Polina Sokolova <[email protected]>
  • Loading branch information
hyangah committed Dec 13, 2021
1 parent ed978a6 commit e4cc6c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export GIT_GOFMT_HOOK=off

YARN="${ROOT}/node_modules/.bin/yarn"

# convert packages-lock.json to yarn.lock
$YARN import

ALL_LICENSES=$(
$YARN licenses list --json --no-progress 2>/dev/null|
jq 'select(.type == "table") | .data.body | map( {name: .[0], version: .[1], license: .[2], url: .[3], verndor: .[4], vendorName: .[5]} )')
Expand All @@ -43,9 +46,10 @@ NG=$(echo "${ALL_LICENSES}" | jq '
"(MIT OR Apache-2.0)": 1,
"(MIT AND Zlib)": 1,
"(MIT AND BSD-3-Clause)": 1,
"Python-2.0": 1,
} as $allowed_licenses |
{
"json-schema@0.2.3": 1,
"json-schema@0.4.0": 1,
} as $allow_list |
.[] | select(.license | in($allowed_licenses) | not)
| select((.name+"@"+.version) | in($allow_list) | not) ')
Expand Down

0 comments on commit e4cc6c3

Please sign in to comment.