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=. -run=^Benchmark_$
18
19 ## coverage: ☂️ Generate coverage report
20 .PHONY: coverage
21 coverage:
22 go run gotest.tools/[email protected] -f testname -- ./... -race -count=1 -coverprofile=coverage.out -covermode=atomic
23 go tool cover -html=coverage.out -o coverage.html
24 open coverage.html &
25
26 ## format: 🎨 Fix code format issues
27 .PHONY: format
28 format:
29 go run mvdan.cc/gofumpt@latest -w -l .
30
31 ## benchfmt: 📝 Format README benchmark lines
32 .PHONY: benchfmt
33 benchfmt:
34 go run ./scripts
35
36 ## benchupdate: 📊 Re-run the README benchmarks and refresh their numbers (ARGS="-block N" for one table)
37 .PHONY: benchupdate
38 benchupdate:
39 go run ./scripts -update $(ARGS)
40
41 ## lint: 🚨 Run lint checks
42 .PHONY: lint
43 lint:
44 go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./...
45
46 ## modernize: ♻️ Check for outdated patterns
47 .PHONY: modernize
48 modernize:
49 go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test=false ./...
50
51 ## test: 🚦 Execute all tests
52 .PHONY: test
53 test:
54 go run gotest.tools/[email protected] -f testname -- ./... -race -count=1 -shuffle=on
55
56 ## tidy: 📌 Clean and tidy dependencies
57 .PHONY: tidy
58 tidy:
59 go mod tidy -v