forked from deqode/GoArcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 836 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
49
50
51
get-linter:
go get github.com/mgechev/revive
get-richgo:
go get -u github.com/kyoh86/richgo
get-dupl:
go get -u github.com/mibk/dupl
get-errcheck:
go get -u github.com/kisielk/errcheck
get-gocritic:
go get -u github.com/go-critic/go-critic/cmd/gocritic
run-gocritic:
gocritic check ./...
run-errcheck: get-errcheck
errcheck ./...
run-dupl: get-dupl
dupl */**.go
run-linter: get-linter
revive -formatter friendly ./...
get-fmt:
go get fmt
run-fmt:
go fmt ./...
tidy:
go mod tidy
go mod vendor
# Run all the linters
run-all-linter: get-linter get-fmt run-linter run-fmt tidy
#Get the test coverage
test: get-richgo
go test -cover ./...
go test -coverprofile=./cover/coverage.out ./...
cat cover/coverage.out
go tool cover -html=./cover/coverage.out
build:
go build -o bin/goarcc -buildmode pie ./cmd/api