From d5162b19175acedde1d3bd652c022f184ec91341 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 5 Jul 2022 20:19:23 +0200 Subject: [PATCH] Add tooling to check go licenses Signed-off-by: Evan Lezar --- Makefile | 5 ++++- docker/Dockerfile.devel | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2b995457..dd78eb8a 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ EXAMPLE_TARGETS := $(patsubst %,example-%, $(EXAMPLES)) CMDS := $(patsubst ./cmd/%/,%,$(sort $(dir $(wildcard ./cmd/*/)))) CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS)) -CHECK_TARGETS := assert-fmt vet lint ineffassign misspell +CHECK_TARGETS := assert-fmt vet lint ineffassign misspell licenses MAKE_TARGETS := binaries build check fmt lint-internal test examples cmds coverage generate $(CHECK_TARGETS) TARGETS := $(MAKE_TARGETS) $(EXAMPLE_TARGETS) $(CMD_TARGETS) @@ -102,6 +102,9 @@ misspell: vet: go vet $(MODULE)/... +licenses: + go-licenses csv $(MODULE)/... + COVERAGE_FILE := coverage.out test: build cmds go test -v -coverprofile=$(COVERAGE_FILE) $(MODULE)/... diff --git a/docker/Dockerfile.devel b/docker/Dockerfile.devel index cb70df4d..cc5e261c 100644 --- a/docker/Dockerfile.devel +++ b/docker/Dockerfile.devel @@ -18,3 +18,4 @@ RUN go install golang.org/x/lint/golint@latest RUN go install github.com/matryer/moq@latest RUN go install github.com/gordonklaus/ineffassign@latest RUN go install github.com/client9/misspell/cmd/misspell@latest +RUN go install github.com/google/go-licenses@latest