Skip to content

Commit 5a8a380

Browse files
committed
add static checks
1 parent d8caee5 commit 5a8a380

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DEPS = $(wildcard */*/*/*.go)
22
VERSION = $(shell git describe --always --dirty)
33

4-
all: lint vet test prometheus-puppetdb prometheus-puppetdb.1
4+
all: lint test prometheus-puppetdb prometheus-puppetdb.1
55

66
prometheus-puppetdb: main.go $(DEPS)
77
GO111MODULE=on CGO_ENABLED=0 GOOS=linux \
@@ -17,16 +17,16 @@ clean:
1717
rm -f prometheus-puppetdb prometheus-puppetdb.1
1818

1919
lint:
20-
@ go get -v golang.org/x/lint/golint
20+
go vet $<
21+
@GO111MODULE=off go get -u honnef.co/go/tools/cmd/staticcheck
22+
staticcheck -tests ./...
23+
@GO111MODULE=off go get -u golang.org/x/lint/golint
2124
@for file in $$(go list ./... | grep -v '_workspace/' | grep -v 'vendor'); do \
2225
export output="$$(golint $${file} | grep -v 'type name will be used as docker.DockerInfo')"; \
2326
[ -n "$${output}" ] && echo "$${output}" && export status=1; \
2427
done; \
2528
exit $${status:-0}
2629

27-
vet: main.go
28-
go vet $<
29-
3030
vendor:
3131
go mod vendor
3232

0 commit comments

Comments
 (0)