-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathjustfile
More file actions
42 lines (32 loc) · 771 Bytes
/
justfile
File metadata and controls
42 lines (32 loc) · 771 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
39
40
41
42
# Build the library
build:
go build -v ./...
# Run all tests
test:
go test -v -count=1 ./...
# Run benchmarks
bench:
go test -bench=. -benchmem -run=^$ ./...
# Run linters
lint:
golangci-lint run
# Run linters and fix issues
lint-fix:
golangci-lint run --fix
# Format code using treefmt
fmt:
treefmt . --allow-missing-formatter
# Check if code is formatted
fmt-check:
treefmt --allow-missing-formatter --fail-on-change
# Generate coverage report
cover:
go test -coverprofile=coverage.txt -covermode=atomic ./...
go tool cover -html=coverage.txt -o coverage.html
# Clean build artifacts
clean:
rm -f coverage.txt coverage.html
# Run all checks (test, lint, coverage)
check: test lint cover
# Default target
default: build