-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (41 loc) · 1.37 KB
/
Makefile
File metadata and controls
50 lines (41 loc) · 1.37 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
################################################################################
# Code Quality Targets
################################################################################
fmt:
@goimports -w .
@golines --shorten-comments -m 120 -w .
@gofumpt -w -l .
@gci write -s standard -s default -s "prefix(github.com/nikoksr/assert-go)" .
.PHONY: fmt
lint:
@golangci-lint run ./...
.PHONY: lint
################################################################################
# Test Targets
################################################################################
test:
@go test -v -race -coverprofile=coverage.out ./...
.PHONY: test
test-debug:
@go test -v -race -tags assertdebug ./...
.PHONY: test-debug
test-coverage:
@go test -race -coverprofile=coverage.out -covermode=atomic ./...
@go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
.PHONY: test-coverage
bench:
@go test -bench=. -benchmem ./...
.PHONY: bench
bench-debug:
@go test -bench=. -benchmem -tags assertdebug ./...
.PHONY: bench-debug
################################################################################
# Convenience Targets
################################################################################
check: fmt lint test
@echo "✅ All checks passed!"
.PHONY: check
ci: lint test test-debug
@echo "✅ CI checks passed!"
.PHONY: ci