-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 804 Bytes
/
Makefile
File metadata and controls
38 lines (30 loc) · 804 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
38
.PHONY: test bench lint fmt vet coverage clean help
# Default target
help:
@echo "GoTree Makefile"
@echo ""
@echo "Available targets:"
@echo " make test - Run all tests"
@echo " make bench - Run benchmarks"
@echo " make lint - Run linter"
@echo " make fmt - Format code"
@echo " make vet - Run go vet"
@echo " make coverage - Generate coverage report"
@echo " make clean - Clean build artifacts"
test:
go test -v -race ./...
bench:
go test -bench=. -benchmem -run=^$$
lint:
golangci-lint run
fmt:
go fmt ./...
vet:
go vet ./...
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
clean:
rm -f coverage.out coverage.html
go clean -testcache