From 2a0e84cdcb2002437b7f821ff4773a63784c6077 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Tue, 1 Jan 2019 19:48:19 +0100 Subject: [PATCH] Check formatting in check-go --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dfdcdec..2ef7d28 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,9 @@ test-coverage: fi \ done +format: + goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*") + test-js: go build -o removeme/gotify app.go (cd ui && CI=true GOTIFY_EXE=../removeme/gotify npm test) @@ -32,16 +35,18 @@ check-go: go vet ./... gocyclo -over 10 $(shell find . -iname '*.go' -type f | grep -v /vendor/) golint -set_exit_status $(shell go list ./... | grep -v mock) + goimports -l $(shell find . -type f -name '*.go' -not -path "./vendor/*") check-js: (cd ui && npm run lint) (cd ui && npm run testformat) download-tools: - go get golang.org/x/lint/golint - go get github.com/fzipp/gocyclo + go get -u golang.org/x/lint/golint + go get -u github.com/fzipp/gocyclo go get -u github.com/gobuffalo/packr/... go get -u github.com/go-swagger/go-swagger/cmd/swagger + go get -u golang.org/x/tools/cmd/goimports update-swagger: swagger generate spec --scan-models -o docs/spec.json