Skip to content

Commit

Permalink
chore: Bump gofumpt to v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Nov 10, 2021
1 parent 4d47c70 commit 9f5908f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .gitignore
@@ -1,7 +1,5 @@
*.exe
/.vagrant
/bin/chezmoi
/bin/gofumports
/bin/gofumpt
/bin/golangci-lint
/chezmoi
/chezmoi.exe
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Expand Up @@ -74,17 +74,17 @@ lint: ensure-golangci-lint
${GO} run ./internal/cmds/lint-whitespace

.PHONY: format
format: ensure-gofumports
find . -name \*.go | xargs ./bin/gofumports -local github.com/twpayne/chezmoi -w
format: ensure-gofumpt
find . -name \*.go | xargs ./bin/gofumpt -w

.PHONY: ensure-tools
ensure-tools: ensure-gofumports ensure-golangci-lint

.PHONY: ensure-gofumports
.PHONY: ensure-gofumpt
ensure-gofumports:
if [ ! -x bin/gofumports ] ; then \
if [ ! -x bin/gofumpt ] ; then \
mkdir -p bin ; \
GOBIN=$(shell pwd)/bin ${GO} install mvdan.cc/gofumpt/gofumports@latest ; \
GOBIN=$(shell pwd)/bin ${GO} install mvdan.cc/gofumpt@v0.2.0 ; \
fi

.PHONY: ensure-golangci-lint
Expand Down

0 comments on commit 9f5908f

Please sign in to comment.