mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
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:
parent
f81dfaf20d
commit
5dad557868
1 changed files with 7 additions and 1 deletions
8
Makefile
8
Makefile
|
@ -338,7 +338,7 @@ errcheck: install-errcheck
|
||||||
install-errcheck:
|
install-errcheck:
|
||||||
which errcheck || GO111MODULE=off go get 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 govulncheck
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test ./lib/... ./app/...
|
go test ./lib/... ./app/...
|
||||||
|
@ -394,6 +394,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.48.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.48.0
|
||||||
|
|
||||||
|
govulncheck: install-govulncheck
|
||||||
|
govulncheck ./...
|
||||||
|
|
||||||
|
install-govulncheck:
|
||||||
|
which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||||
|
|
||||||
install-wwhrd:
|
install-wwhrd:
|
||||||
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd
|
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue