diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index ce272b70d..c591ebf24 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -16,11 +16,8 @@ jobs: with: go-version: 1.16 id: go - - name: Dependencies - run: | - go get -u github.com/frapposelli/wwhrd - name: Code checkout uses: actions/checkout@master - name: Check License run: | - wwhrd check + make check-licenses diff --git a/.wwhrd.yml b/.wwhrd.yml index 5afba720d..41f0154c6 100644 --- a/.wwhrd.yml +++ b/.wwhrd.yml @@ -1,6 +1,4 @@ -blacklist: - - GPL-2.0 -whitelist: +allowlist: - Apache-2.0 - MIT - BSD-3-Clause diff --git a/Makefile b/Makefile index 22a73add5..65371ac26 100644 --- a/Makefile +++ b/Makefile @@ -190,7 +190,7 @@ lint: install-golint golint app/... 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 -exclude=errcheck_excludes.txt ./lib/... @@ -205,7 +205,7 @@ errcheck: install-errcheck errcheck -exclude=errcheck_excludes.txt ./app/vmctl/... 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 @@ -254,7 +254,7 @@ quicktemplate-gen: install-qtc 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 @@ -263,6 +263,12 @@ 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 +install-wwhrd: + which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd + +check-licenses: install-wwhrd + wwhrd check -f .wwhrd.yml + copy-docs: echo "---\nsort: ${ORDER}\n---\n" > ${DST} cat ${SRC} >> ${DST}