-
-
Notifications
You must be signed in to change notification settings - Fork 239
/
Makefile
48 lines (39 loc) · 857 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
all: tidy gen build lint test spell
tidy:
go mod tidy -v
cd _examples && go get -v -u github.com/gavv/httpexpect/v2
cd _examples && go mod tidy -v -compat=1.17
gen:
go generate ./...
fmt:
gofmt -s -w . ./e2e ./_examples
ifneq (,$(findstring GNU,$(shell sed --version)))
sed -r -e ':loop' -e 's,^(//\t+) ,\1\t,g' -e 't loop' -i *.go e2e/*.go _examples/*.go
endif
build:
go build ./...
cd _examples && go build
lint:
golangci-lint run ./...
cd _examples && golangci-lint run .
test:
ifneq ($(shell which gotest),)
gotest ./...
cd _examples && gotest
else
go test ./...
cd _examples && go test
endif
short:
ifneq ($(shell which gotest),)
gotest -short ./...
else
go test -short ./...
endif
spell:
ifneq ($(shell which mdspell),)
mdspell -a README.md
sort .spelling -o .spelling
endif
toc:
markdown-toc --maxdepth 3 -i HACKING.md