From a33c8a286748a20cd7863ab3a6fcaeb17519cb45 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Fri, 16 Nov 2018 10:49:14 -0800 Subject: [PATCH] Makefile: remove required argument to checkcoverage We are on Go 1.11 now and -coverprofile supports multiple packages. Signed-off-by: Matthew Johnson --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index a65744a..04df308 100644 --- a/Makefile +++ b/Makefile @@ -31,18 +31,10 @@ install: check: go test -cover ${GO_PACKAGE_PREFIX}/... -# TODO: when Go 1.10 comes out we will have support for passing multiple packages -# to coverprofile, so there will be no need to pass an individual package. -# At that time we can merge this target into check and run it against all -# packages every time. .PHONY: checkcoverage -checkcoverage: gopath -ifeq (,${PKG}) - $(error PKG is not set, try make PKG=swupd checkcoverage) -else - go test -cover ${GO_PACKAGE_PREFIX}/${PKG} -coverprofile=coverage.out +checkcoverage: + go test -cover ${GO_PACKAGE_PREFIX}/... -coverprofile=coverage.out go tool cover -html=coverage.out -endif .PHONY: lint lint: