-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (22 loc) · 961 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (22 loc) · 961 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
.PHONY: help ok check lint fix test test-coverage build tools
help: ## Show available targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
ok: check lint test ## Run all Go checks (fmt, vet, lint, test) — no artifacts
check: ## Type-check (go vet + go build)
go vet ./...
go build ./...
lint: ## Run golangci-lint
go tool golangci-lint run ./...
fix: ## Auto-fix (gofmt + golangci-lint --fix)
gofmt -w .
go tool golangci-lint run --fix ./...
test: ## Run tests with race detector (dry-run, no artifacts)
go test -race ./...
test-coverage: ## Run tests with race detector and coverage report
go test -race -coverprofile=coverage.out ./...
build: ## Build binaries
@mkdir -p bin
go build -o bin/noskills-server ./cmd/noskills-server/
go build -o bin/noskills ./cmd/noskills/
tools: ## Download tool dependencies declared in go.mod
go mod download