diff --git a/.circleci/config.yml b/.circleci/config.yml index ca6235e..d4a119c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: key: repo-{{ .Environment.CIRCLE_SHA1 }} - run: name: Check formatting of all go files - command: make checkfmt + command: make goimports checkfmt lint: <<: *defaults diff --git a/Makefile b/Makefile index 9afdcf7..b8c6600 100644 --- a/Makefile +++ b/Makefile @@ -162,12 +162,17 @@ authors: ## Generate Authors changelog: ## Generate Changelog git-chglog --config hack/chglog --output CHANGELOG.md +.PHONY: goimports +goimports: ## Install goimports + @ $(MAKE) --no-print-directory log-$@ + GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports + .PHONY: tools tools: ## Install required tools @ $(MAKE) --no-print-directory log-$@ - @ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION) - @ curl -sfL https://github.com/git-chglog/git-chglog/releases/download/$(GITCHGLOG_VERSION)/git-chglog_$(shell go env GOOS)_$(shell go env GOARCH) -o $(shell go env GOPATH)/bin/git-chglog && chmod +x $(shell go env GOPATH)/bin/git-chglog - @ cd /tmp && go get -v -u github.com/mitchellh/gox + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_VERSION) + curl -sfL https://github.com/git-chglog/git-chglog/releases/download/$(GITCHGLOG_VERSION)/git-chglog_$(shell go env GOOS)_$(shell go env GOARCH) -o $(shell go env GOPATH)/bin/git-chglog && chmod +x $(shell go env GOPATH)/bin/git-chglog + GO111MODULE=off go get -u github.com/mitchellh/gox #################################### ## Self-Documenting Makefile Help ##