aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-07-31 22:16:39 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-01 10:44:50 +0200
commit21dcd440f877192af128c00ca2acbabf68bb3ee3 (patch)
treed5295961837bbc834fe5380212f7acea477f0103 /Makefile
parent5cf81f1cb1e5a1b54dc9421b763b683b6275fb57 (diff)
downloadaerc-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--Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 66dc1563..e4755a8a 100644
--- a/Makefile
+++ b/Makefile
@@ -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