diff options
-rw-r--r-- | .build.yml | 3 | ||||
-rw-r--r-- | Makefile | 12 |
2 files changed, 15 insertions, 0 deletions
@@ -5,6 +5,9 @@ packages: sources: - https://git.sr.ht/~rjarry/aerc tasks: +- checkfmt: | + cd aerc + make checkfmt - build: | cd aerc make @@ -28,6 +28,18 @@ aerc: $(GOSRC) -X main.Version=$(VERSION)" \ -o $@ +.PHONY: fmt +fmt: + gofmt -w . + +.PHONY: checkfmt +checkfmt: + @if [ `gofmt -l . | wc -l` -ne 0 ]; then \ + gofmt -d .; \ + echo "ERROR: source files need reformatting with gofmt"; \ + exit 1; \ + fi + aerc.conf: config/aerc.conf.in sed -e 's:@SHAREDIR@:$(SHAREDIR):g' > $@ < config/aerc.conf.in |