Check formatting in check-go

This commit is contained in:
Jannis Mattheis 2019-01-01 19:48:19 +01:00
parent b5b2f19dc2
commit 2a0e84cdcb
1 changed files with 7 additions and 2 deletions

View File

@ -23,6 +23,9 @@ test-coverage:
fi \ fi \
done done
format:
goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
test-js: test-js:
go build -o removeme/gotify app.go go build -o removeme/gotify app.go
(cd ui && CI=true GOTIFY_EXE=../removeme/gotify npm test) (cd ui && CI=true GOTIFY_EXE=../removeme/gotify npm test)
@ -32,16 +35,18 @@ check-go:
go vet ./... go vet ./...
gocyclo -over 10 $(shell find . -iname '*.go' -type f | grep -v /vendor/) gocyclo -over 10 $(shell find . -iname '*.go' -type f | grep -v /vendor/)
golint -set_exit_status $(shell go list ./... | grep -v mock) golint -set_exit_status $(shell go list ./... | grep -v mock)
goimports -l $(shell find . -type f -name '*.go' -not -path "./vendor/*")
check-js: check-js:
(cd ui && npm run lint) (cd ui && npm run lint)
(cd ui && npm run testformat) (cd ui && npm run testformat)
download-tools: download-tools:
go get golang.org/x/lint/golint go get -u golang.org/x/lint/golint
go get github.com/fzipp/gocyclo go get -u github.com/fzipp/gocyclo
go get -u github.com/gobuffalo/packr/... go get -u github.com/gobuffalo/packr/...
go get -u github.com/go-swagger/go-swagger/cmd/swagger go get -u github.com/go-swagger/go-swagger/cmd/swagger
go get -u golang.org/x/tools/cmd/goimports
update-swagger: update-swagger:
swagger generate spec --scan-models -o docs/spec.json swagger generate spec --scan-models -o docs/spec.json