-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (31 loc) · 876 Bytes
/
Makefile
File metadata and controls
37 lines (31 loc) · 876 Bytes
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
.PHONY: all
all: help
## help: Display this help message
.PHONY: help
help: Makefile
@echo
@echo " Choose a make command to run"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
## test: Run tests with race detection and coverage
.PHONY: test
test:
go test -timeout 3m -race -cover ./...
## test-norace: Run tests WITHOUT race detector and with multiple iterations (mimics CI; catches goroutine ordering races that -race masks)
.PHONY: test-norace
test-norace:
go test -timeout 3m -count=10 ./...
## bench: Run performance benchmarks
.PHONY: bench
bench:
go test -timeout 2m -run=^$$ -bench=. -benchmem ./...
## lint: Run golangci-lint code quality checks
.PHONY: lint
lint:
golangci-lint run ./...
## lint-fix: Run golangci-lint with auto-fix for common issues
.PHONY: lint-fix
lint-fix:
golangci-lint fmt
golangci-lint run --fix ./...