Makefile: check for vulnerabilities in used Go packages with govulncheck when running make check-all

See https://go.dev/blog/vuln
This commit is contained in:
Aliaksandr Valialkin 2022-09-08 18:35:31 +03:00
parent e619fa8b38
commit c083286a92
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -165,7 +165,7 @@ errcheck: install-errcheck
install-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 govulncheck
test:
go test ./lib/... ./app/...
@ -221,6 +221,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.48.0
govulncheck: install-govulncheck
govulncheck ./...
install-govulncheck:
which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest
install-wwhrd:
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd