-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (49 loc) · 2.13 KB
/
Makefile
File metadata and controls
61 lines (49 loc) · 2.13 KB
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
52
53
54
55
56
57
58
59
60
61
MODULES=$(shell go list -m)
build:
go build -v ${MODULES} ./...
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd go build -v ./...; fi
test:
go test -race ${MODULES} ./...
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd go test -race ./...; fi
watch-test:
reflex -t 50ms -s -- sh -c 'gotest -timeout 300s -race ${MODULES} ./...'
bench:
go test -v -run=^Benchmark -benchmem -count 3 -bench ${MODULES} ./...
watch-bench:
reflex -t 50ms -s -- sh -c 'go test -v -run=^Benchmark -benchmem -count 3 -bench ${MODULES} ./...'
coverage:
go test -v -coverprofile=cover.out -covermode=atomic ${MODULES} ./...
go tool cover -html=cover.out -o cover.html
tools:
go install github.com/cespare/reflex@latest
go install github.com/rakyll/gotest@latest
go install github.com/psampaz/go-mod-outdated@latest
go install github.com/jondot/goweight@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go get -t -u golang.org/x/tools/cmd/cover
go install github.com/sonatype-nexus-community/nancy@latest
go install golang.org/x/perf/cmd/benchstat@latest
go install github.com/cespare/prettybench@latest
go install github.com/samber/headercheck/cmd/headercheck@latest
go mod tidy
# brew install hougesen/tap/mdsf
lint:
golangci-lint run --timeout 60s --max-same-issues 50 ./...
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd golangci-lint run --timeout 60s --max-same-issues 50 ./...; fi
headercheck --config ./licenses/headercheck.yaml .
# mdsf verify --debug --log-level warn docs/
lint-fix:
golangci-lint run --timeout 60s --max-same-issues 50 --fix ./...
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd golangci-lint run --timeout 60s --max-same-issues 50 --fix ./...; fi
headercheck --config ./licenses/headercheck.yaml --fix .
# mdsf format --debug --log-level warn docs/
audit:
go mod tidy
go list -json -m all | nancy sleuth
outdated:
go mod tidy
go list -u -m -json all | go-mod-outdated -update -direct
weight:
goweight
doc:
cd docs && npm install && npm start