diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-07-31 22:16:39 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-01 10:44:50 +0200 |
commit | 21dcd440f877192af128c00ca2acbabf68bb3ee3 (patch) | |
tree | d5295961837bbc834fe5380212f7acea477f0103 /Makefile | |
parent | 5cf81f1cb1e5a1b54dc9421b763b683b6275fb57 (diff) | |
download | aerc-21dcd440f877192af128c00ca2acbabf68bb3ee3.tar.gz |
lint: use gofumpt instead of gofmt
Link: https://github.com/mvdan/gofumpt
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -54,15 +54,13 @@ dev: .PHONY: fmt fmt: - gofmt -w . + $(GO) run mvdan.cc/gofumpt -w . .PHONY: lint lint: - @echo "gofmt -d ."; if [ `gofmt -l . | wc -l` -ne 0 ]; then \ - gofmt -d .; \ - echo "ERROR: source files need reformatting with gofmt"; \ - exit 1; \ - fi + @$(GO) run mvdan.cc/gofumpt -l . | grep ^ \ + && echo The above files need to be formatted, please run make fmt && exit 1 \ + || echo all files formatted. $(GO) vet ./... .PHONY: tests |