Skip to content

Commit acb0926

Browse files
authored
Merge pull request #19810 from joshjms/makefile-govulncheck
[release-3.4] Add run-govulncheck Makefile target
2 parents 1a36b48 + 60f1400 commit acb0926

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -563,3 +563,10 @@ fix: sync-toolchain-directive
563563
.PHONY: sync-toolchain-directive
564564
sync-toolchain-directive:
565565
./scripts/sync_go_toolchain_directive.sh
566+
567+
.PHONY: run-govulncheck
568+
run-govulncheck:
569+
ifeq (, $(shell which govulncheck))
570+
$(shell go install golang.org/x/vuln/cmd/govulncheck@latest)
571+
endif
572+
PASSES="govuln" ./test

test

+4
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ function markdown_marker_pass {
451451
fi
452452
}
453453

454+
function govuln_pass {
455+
govulncheck -show verbose ./...
456+
}
457+
454458
function goword_pass {
455459
if command -v goword >/dev/null; then
456460
# get all go files to process

0 commit comments

Comments
 (0)