diff --git a/Makefile b/Makefile index 0c835e57fb..e36f88e4b5 100644 --- a/Makefile +++ b/Makefile @@ -299,6 +299,9 @@ build-mo: $(MOFILES) .PHONY: static-analysis static-analysis: +ifeq ($(shell command -v go-licenses),) + (cd / ; $(GO) install -v -x github.com/google/go-licenses@latest) +endif ifeq ($(shell command -v golangci-lint),) curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$($(GO) env GOPATH)/bin endif diff --git a/test/lint/licenses.sh b/test/lint/licenses.sh new file mode 100755 index 0000000000..444b2c9c96 --- /dev/null +++ b/test/lint/licenses.sh @@ -0,0 +1,2 @@ +#!/bin/sh -eu +go-licenses check ./...