From 1495c46ae6d3ab7e272a80a5fb22cfbdbc6326c7 Mon Sep 17 00:00:00 2001 From: Hanzei Date: Fri, 12 Oct 2018 15:03:10 +0200 Subject: [PATCH] Add govet target --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8d031bc..4f31d05 100644 --- a/Makefile +++ b/Makefile @@ -19,16 +19,17 @@ apply: ./build/bin/manifest apply .PHONY: check-style -check-style: webapp/.npminstall gofmt +check-style: webapp/.npminstall gofmt govet @echo Checking for style guide compliance ifneq ($(HAS_WEBAPP),) cd webapp && npm run lint endif +.PHONY: gofmt gofmt: ifneq ($(HAS_SERVER),) - @echo Running gomft + @echo Running gofmt @for package in $$(go list ./server/...); do \ echo "Checking "$$package; \ files=$$(go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \ @@ -44,6 +45,14 @@ ifneq ($(HAS_SERVER),) @echo Gofmt success endif +.PHONY: govet +govet: +ifneq ($(HAS_SERVER),) + @echo Running govet + @$(GO) vet $$(go list ./server/...) || exit 1 + @echo Govet success +endif + # server/.depensure ensures the server dependencies are installed server/.depensure: ifneq ($(HAS_SERVER),)