Remove go version check for make fmt (#2558)
This commit is contained in:
parent
80b430d7c0
commit
6f380a22a4
1 changed files with 2 additions and 5 deletions
7
Makefile
7
Makefile
|
@ -69,11 +69,8 @@ clean:
|
||||||
integrations/indexers-mysql/ integrations/indexers-pgsql integrations/indexers-sqlite \
|
integrations/indexers-mysql/ integrations/indexers-pgsql integrations/indexers-sqlite \
|
||||||
integrations/mysql.ini integrations/pgsql.ini
|
integrations/mysql.ini integrations/pgsql.ini
|
||||||
|
|
||||||
required-gofmt-version:
|
|
||||||
@$(GO) version | grep -q '\(1.7\|1.8\)' || { echo "We require go version 1.7 or 1.8 to format code" >&2 && exit 1; }
|
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: required-gofmt-version
|
fmt:
|
||||||
$(GOFMT) -w $(GOFILES)
|
$(GOFMT) -w $(GOFILES)
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
|
@ -125,7 +122,7 @@ misspell:
|
||||||
misspell -w -i unknwon $(GOFILES)
|
misspell -w -i unknwon $(GOFILES)
|
||||||
|
|
||||||
.PHONY: fmt-check
|
.PHONY: fmt-check
|
||||||
fmt-check: required-gofmt-version
|
fmt-check:
|
||||||
# get all go files and run go fmt on them
|
# get all go files and run go fmt on them
|
||||||
@diff=$$($(GOFMT) -d $(GOFILES)); \
|
@diff=$$($(GOFMT) -d $(GOFILES)); \
|
||||||
if [ -n "$$diff" ]; then \
|
if [ -n "$$diff" ]; then \
|
||||||
|
|
Reference in a new issue