-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
29 lines (29 loc) · 941 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
linters:
which golangci-lint || (go install github.com/golangci/golangci-lint/cmd/[email protected] && echo installed linter)
golangci-lint run --disable-all \
-E "errcheck" \
-E "errname" \
-E "errorlint" \
-E "exhaustive" \
-E "exportloopref" \
-E "gci" \
-E "gocritic" \
-E "godot" \
-E "gofmt" \
-E "goimports" \
-E "govet" \
-E "grouper" \
-E "ineffassign" \
-E "ireturn" \
-E "misspell" \
-E "prealloc" \
-E "predeclared" \
-E "revive" \
-E "staticcheck" \
-E "thelper" \
-E "unparam" \
-E "unused" \
./...
test: linters
GOEXPERIMENT=loopvar go test -count 1 -coverprofile=coverage.out -shuffle on -short -v -dsn="postgres://postgres:everyone@localhost:5432/postgres?sslmode=disable" || (sleep 5; go test -coverprofile=coverage.out -shuffle on -short -v -dsn="postgres://postgres:everyone@localhost:5432/postgres?sslmode=disable")
go tool cover -html=coverage.out -o coverage.html