mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
[build] Add gofmt-related Makefile targets
This adds `verify-gofmt` and `gofmt` make targets for quick go-fmting. It also adds a `verify` target which verifies `gofmt` and the runs the unit tests. Travis now runs `make verify` instead of just `make test` as the tests.
This commit is contained in:
parent
bbf23f18d0
commit
417f5a9f99
3 changed files with 51 additions and 2 deletions
10
Makefile
10
Makefile
|
|
@ -24,7 +24,7 @@ ifeq ($(ARCH),s390x)
|
|||
BASEIMAGE?=s390x/busybox
|
||||
endif
|
||||
|
||||
.PHONY: all build docker-build push-% push test
|
||||
.PHONY: all build docker-build push-% push test verify-gofmt gofmt verify
|
||||
|
||||
all: build
|
||||
build: vendor
|
||||
|
|
@ -56,3 +56,11 @@ vendor: glide.lock
|
|||
|
||||
test: vendor
|
||||
CGO_ENABLED=0 go test ./pkg/...
|
||||
|
||||
verify-gofmt:
|
||||
./hack/gofmt-all.sh -v
|
||||
|
||||
gofmt:
|
||||
./hack/gofmt-all.sh
|
||||
|
||||
verify: verify-gofmt test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue