Debian Codegraph @

Makefile

raw
1 ## help: 💡 Display available commands
2 .PHONY: help
3 help:
4 @echo '⚡️ GoFiber/Fiber Development:'
5 @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
6
7 ## audit: 🚀 Conduct quality checks
8 .PHONY: audit
9 audit:
10 go mod verify
11 go vet ./...
12 go run golang.org/x/vuln/cmd/govulncheck@latest ./...
13
14 ## benchmark: 📈 Benchmark code performance
15 .PHONY: benchmark
16 benchmark:
17 go test ./... -benchmem -bench=. -count=4 -run=^Benchmark_$
18
19 ## coverage: ☂️ Generate coverage report
20 .PHONY: coverage
21 coverage:
22 go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=1 -coverprofile=/tmp/coverage.out -covermode=atomic
23 go tool cover -html=/tmp/coverage.out
24
25 ## format: 🎨 Fix code format issues
26 .PHONY: format
27 format:
28 go run mvdan.cc/gofumpt@latest -w -l .
29
30 ## markdown: 🎨 Find markdown format issues (Requires markdownlint-cli2)
31 .PHONY: markdown
32 markdown:
33 markdownlint-cli2 "**/*.md" "#vendor"
34
35 ## lint: 🚨 Run lint checks
36 .PHONY: lint
37 lint:
38 go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./...
39
40 ## test: 🚦 Execute all tests
41 .PHONY: test
42 test:
43 go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=1 -shuffle=on
44
45 ## longtest: 🚦 Execute all tests 10x
46 .PHONY: longtest
47 longtest:
48 go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=15 -shuffle=on
49
50 ## tidy: 📌 Clean and tidy dependencies
51 .PHONY: tidy
52 tidy:
53 go mod tidy -v
54
55 ## betteralign: 📐 Optimize alignment of fields in structs
56 .PHONY: betteralign
57 betteralign:
58 go run github.com/dkorunic/betteralign/cmd/betteralign@latest -test_files -generated_files -apply ./...
59
60 ## generate: ⚡️ Generate msgp && interface implementations
61 .PHONY: generate
62 generate:
63 go install github.com/tinylib/msgp@latest
64 go install github.com/vburenin/ifacemaker@975a95966976eeb2d4365a7fb236e274c54da64c
65 go generate ./...