We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d68093e commit 4b72157Copy full SHA for 4b72157
1 file changed
Makefile
@@ -2,18 +2,19 @@ XGOARCH := amd64
2
XGOOS := linux
3
XBIN := $(XGOOS)_$(XGOARCH)/atb
4
5
-all: lint test install
+all: checkfmt vet test install
6
7
test:
8
go test ./...
9
10
vet:
11
go vet ./...
12
13
-check-fmt:
14
- bash -c "diff --line-format='%L' <(echo -n) <(gofmt -d -s .)"
+checkfmt:
+ @sh -c "test -z $$(gofmt -l .)" || { echo "one or more files need to be formatted: try make fmt to fix this automatically"; exit 1; }
15
16
-lint: check-fmt vet
+fmt:
17
+ gofmt -w .
18
19
install:
20
go install ./...
0 commit comments