Skip to content

Commit

Permalink
Add Unlicence to allowed licence list for go-licence-detector
Browse files Browse the repository at this point in the history
After QuesmaOrg#1212, go-licence-detector GitHub Actions job started failing.
One of the added dependencies uses Unlicence licence, which is not
on the allowlist of the default go-licence-detector rules list.

Unlicence is a public-domain-equivalent licence. The default rules list
already allowed similar licences, such as "CC0-1.0" and "Public Domain",
so it should be OK to add Unlicence to the allowed list.

The added rules.json is a default rules file with only Unlicence added.

This fixes the NOTICE.MD generation with go-licence-detector.
  • Loading branch information
avelanarius committed Jan 29, 2025
1 parent a7c2a17 commit 421596e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/go-licence-detector/rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"_comment": "This is the stock rules.json file (https://github.com/elastic/go-licence-detector/blob/master/assets/rules.json) but with added Unlicense",
"allowlist": [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"MIT",
"MPL-2.0",
"Public Domain",
"CC0-1.0",
"Unlicense"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/generate-notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
go mod tidy
go mod download all
go list -m -json all | jq 'select(.Path != "quesma_v2")' | go-licence-detector -includeIndirect -noticeTemplate=../.github/go-licence-detector/templates/NOTICE.MD.tmpl -noticeOut=../NOTICE.MD -depsTemplate=../.github/go-licence-detector/templates/dependencies.asciidoc.tmpl -depsOut=dependencies.asciidoc -overrides=../.github/go-licence-detector/overrides.ndjson
go list -m -json all | jq 'select(.Path != "quesma_v2")' | go-licence-detector -includeIndirect -noticeTemplate=../.github/go-licence-detector/templates/NOTICE.MD.tmpl -noticeOut=../NOTICE.MD -depsTemplate=../.github/go-licence-detector/templates/dependencies.asciidoc.tmpl -depsOut=dependencies.asciidoc -overrides=../.github/go-licence-detector/overrides.ndjson -rules=../.github/go-licence-detector/rules.json
rm dependencies.asciidoc
- name: Print NOTICE.MD
Expand Down

0 comments on commit 421596e

Please sign in to comment.