Add govet target
This commit is contained in:
parent
0f51dc026e
commit
1495c46ae6
1 changed files with 11 additions and 2 deletions
13
Makefile
13
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),)
|
||||
|
|
Reference in a new issue