Skip to content

Commit

Permalink
Add make check-licenses rule for the ability to manually check lice…
Browse files Browse the repository at this point in the history
…nses in vendored dependencies

This is a follow-up for c687536
  • Loading branch information
valyala committed May 10, 2021
1 parent 5b986c9 commit 8b65920
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions .wwhrd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
blacklist:
- GPL-2.0
whitelist:
allowlist:
- Apache-2.0
- MIT
- BSD-3-Clause
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/...
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit 8b65920

Please sign in to comment.