Add run-govulncheck Makefile target

Add a `Makefile` target to run govuln across the submodules. So, it can
be imported into a prow job.

Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
Ivan Valdes 2024-06-15 15:47:13 -07:00
parent 45f14539e0
commit 043096067f
No known key found for this signature in database
GPG Key ID: 4037D37741ED0CC5
2 changed files with 11 additions and 0 deletions

View File

@ -164,6 +164,13 @@ ifeq (, $(shell which yamlfmt))
endif
yamlfmt -conf tools/.yamlfmt .
.PHONY: run-govulncheck
run-govulncheck:
ifeq (, $(shell which govulncheck))
$(shell go install golang.org/x/vuln/cmd/govulncheck@latest)
endif
PASSES="govuln" ./scripts/test.sh
# Tools
GOLANGCI_LINT_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} github.com/golangci/golangci-lint)

View File

@ -366,6 +366,10 @@ function markdown_marker_pass {
fi
}
function govuln_pass {
run_for_modules run govulncheck -show verbose
}
function govet_pass {
run_for_modules generic_checker run go vet
}