Add make check-licenses rule for the ability to manually check licenses in vendored dependencies

This is a follow-up for c687536956
This commit is contained in:
Aliaksandr Valialkin 2021-05-10 11:54:35 +03:00
parent 5b986c95dd
commit 8b65920a8b
3 changed files with 11 additions and 10 deletions

View file

@ -16,11 +16,8 @@ jobs:
with: with:
go-version: 1.16 go-version: 1.16
id: go id: go
- name: Dependencies
run: |
go get -u github.com/frapposelli/wwhrd
- name: Code checkout - name: Code checkout
uses: actions/checkout@master uses: actions/checkout@master
- name: Check License - name: Check License
run: | run: |
wwhrd check make check-licenses

View file

@ -1,6 +1,4 @@
blacklist: allowlist:
- GPL-2.0
whitelist:
- Apache-2.0 - Apache-2.0
- MIT - MIT
- BSD-3-Clause - BSD-3-Clause

View file

@ -190,7 +190,7 @@ lint: install-golint
golint app/... golint app/...
install-golint: install-golint:
which golint || go install golang.org/x/lint/golint which golint || GO111MODULE=off go get golang.org/x/lint/golint
errcheck: install-errcheck errcheck: install-errcheck
errcheck -exclude=errcheck_excludes.txt ./lib/... errcheck -exclude=errcheck_excludes.txt ./lib/...
@ -205,7 +205,7 @@ errcheck: install-errcheck
errcheck -exclude=errcheck_excludes.txt ./app/vmctl/... errcheck -exclude=errcheck_excludes.txt ./app/vmctl/...
install-errcheck: install-errcheck:
which errcheck || go install github.com/kisielk/errcheck which errcheck || GO111MODULE=off go get github.com/kisielk/errcheck
check-all: fmt vet lint errcheck golangci-lint check-all: fmt vet lint errcheck golangci-lint
@ -254,7 +254,7 @@ quicktemplate-gen: install-qtc
qtc qtc
install-qtc: install-qtc:
which qtc || go install github.com/valyala/quicktemplate/qtc which qtc || GO111MODULE=off go get github.com/valyala/quicktemplate/qtc
golangci-lint: install-golangci-lint golangci-lint: install-golangci-lint
@ -263,6 +263,12 @@ golangci-lint: install-golangci-lint
install-golangci-lint: install-golangci-lint:
which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.29.0 which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.29.0
install-wwhrd:
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd
check-licenses: install-wwhrd
wwhrd check -f .wwhrd.yml
copy-docs: copy-docs:
echo "---\nsort: ${ORDER}\n---\n" > ${DST} echo "---\nsort: ${ORDER}\n---\n" > ${DST}
cat ${SRC} >> ${DST} cat ${SRC} >> ${DST}