mirror of
https://github.com/coredns/coredns.git
synced 2025-09-20 13:11:17 +02:00
Add dependency of go fmt
in Makefile
(#553)
This fix adds the dependency of `go fmt` in `Makefile` so that any new check in will have to properly fmt the source code with `gofmt -s -w`.
This commit is contained in:
parent
4723fb9418
commit
43c2fcc1ef
8
Makefile
8
Makefile
@ -20,7 +20,7 @@ docker: deps
|
|||||||
docker tag $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$(DOCKER_VERSION)
|
docker tag $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME):$(DOCKER_VERSION)
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps:
|
deps: fmt
|
||||||
go get ${BUILD_VERBOSE}
|
go get ${BUILD_VERBOSE}
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
@ -55,6 +55,12 @@ core/zmiddleware.go core/dnsserver/zdirectives.go: middleware.cfg
|
|||||||
gen:
|
gen:
|
||||||
go generate coredns.go
|
go generate coredns.go
|
||||||
|
|
||||||
|
.PHONY: fmt
|
||||||
|
fmt:
|
||||||
|
## run go fmt
|
||||||
|
@test -z "$$(gofmt -s -l . | grep -v vendor/ | tee /dev/stderr)" || \
|
||||||
|
(echo "please format Go code with 'gofmt -s -w'" && false)
|
||||||
|
|
||||||
.PHONY: distclean
|
.PHONY: distclean
|
||||||
distclean: clean
|
distclean: clean
|
||||||
# Clean all dependencies and build artifacts
|
# Clean all dependencies and build artifacts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user