-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
37 lines (28 loc) · 929 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
GINKGO_FLAGS=
GINKGO_BASE_FLAGS=-r --randomize-all -p --trace --race --vet=all --covermode=atomic --coverprofile=cover.profile
GINKGO_TEST_FLAGS=${GINKGO_BASE_FLAGS} --randomize-suites
GINKGO_WATCH_FLAGS=${GINKGO_BASE_FLAGS}
PKG_PATH=
setup:
go get -v -t ./...
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
build:
go build -v -o ./out/abnf ./cmd/...
install:
go install -v ./cmd/...
test:
ginkgo version
ginkgo $(GINKGO_TEST_FLAGS) $(GINKGO_FLAGS) ./$(PKG_PATH)
watch:
ginkgo version
ginkgo watch $(GINKGO_WATCH_FLAGS) $(GINKGO_FLAGS) ./$(PKG_PATH)
lint:
golangci-lint run -v ./...
govulncheck -version ./...
cover-report:
go tool cover -html=./cover.profile
doc:
@echo "Running documentation on http://localhost:8080/github.com/ghettovoice/abnf"
pkgsite -http=localhost:8080