Makefile: add clean-checkers rule for dropping checker apps used in make check-all

The `make clean-checkers` command may be useful when the locally installed checker apps are too old,
so they must be updated to the newly requested versions by `make check-all`. In this case the fix is to run

    make clean-checkers check-all
This commit is contained in:
Aliaksandr Valialkin 2024-06-25 20:28:38 +02:00
parent a632abf965
commit 042ea66300
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -440,6 +440,8 @@ vet:
check-all: fmt vet golangci-lint govulncheck check-all: fmt vet golangci-lint govulncheck
clean-checkers: remove-golangci-lint remove-govulncheck
test: test:
go test ./lib/... ./app/... go test ./lib/... ./app/...
@ -494,12 +496,18 @@ 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.59.1 which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.59.1
remove-golangci-lint:
rm -rf `which golangci-lint`
govulncheck: install-govulncheck govulncheck: install-govulncheck
govulncheck ./... govulncheck ./...
install-govulncheck: install-govulncheck:
which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest
remove-govulncheck:
rm -rf `which govulncheck`
install-wwhrd: install-wwhrd:
which wwhrd || go install github.com/frapposelli/wwhrd@latest which wwhrd || go install github.com/frapposelli/wwhrd@latest