-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 803 Bytes
/
Makefile
File metadata and controls
36 lines (29 loc) · 803 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
# Makefile for Kore DI Library
.PHONY: all test lint fmt clean help
all: fmt lint test
# Run all tests with coverage
test:
@echo "Running tests..."
go test -v -race -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
# Run golangci-lint
lint:
@echo "Running linter..."
golangci-lint run ./...
# Format all go files
fmt:
@echo "Formatting files..."
go fmt ./...
go mod tidy
# Clean up build artifacts
clean:
@echo "Cleaning up..."
rm -f coverage.out
# Display available commands
help:
@echo "Available commands:"
@echo " make test - Run tests with race detection and coverage"
@echo " make lint - Run golangci-lint"
@echo " make fmt - Format code and tidy mod files"
@echo " make clean - Remove temporary files"
@echo " make all - Run fmt, lint, and test"