Skip to content

Commit

Permalink
Add run-govulncheck Makefile target
Browse files Browse the repository at this point in the history
Add a `Makefile` target to run govuln across the submodules. So, it can
be imported into a prow job.

Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed Jun 15, 2024
1 parent 45f1453 commit 0430960
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0430960

Please sign in to comment.