-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (21 loc) · 818 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
LOCAL_PACKAGE_PREFIX := github.com/178inaba/appengine-echo-logging
.PHONY: all fmt fmt-diff ci-lint ci-lint-fix lint vet test install-tools go-get-tools
all: ci-lint-fix fmt ci-lint lint vet test
fmt:
goimports -local '$(LOCAL_PACKAGE_PREFIX)' -w .
fmt-diff:
test -z $$(goimports -local '$(LOCAL_PACKAGE_PREFIX)' -l .) || (goimports -local '$(LOCAL_PACKAGE_PREFIX)' -d . && exit 1)
ci-lint:
golangci-lint run
ci-lint-fix:
golangci-lint run --fix
lint:
golint -set_exit_status ./...
vet:
go vet ./...
test:
go test -race -count 1 -cover ./...
install-tools: go-get-tools
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.27.0
go-get-tools:
GO111MODULE=off go get -u golang.org/x/lint/golint golang.org/x/tools/cmd/goimports