-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (44 loc) · 1.3 KB
/
Makefile
File metadata and controls
61 lines (44 loc) · 1.3 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
50
51
52
53
54
55
56
57
58
59
60
61
SHELL := /bin/bash
GOLANGCI_LINT ?= $(shell command -v golangci-lint 2>/dev/null || echo $$(go env GOPATH)/bin/golangci-lint)
.PHONY: all fmt fmt-check vet lint test cover build doc-check tidy clean install gates conformance diagrams examples-smoke
all: gates
fmt:
gofmt -w .
fmt-check:
@out=$$(gofmt -l .); \
if [ -n "$$out" ]; then \
echo "gofmt needs to be run on:"; \
echo "$$out"; \
exit 1; \
fi
vet:
go vet ./...
lint:
$(GOLANGCI_LINT) run
test:
go test -race -count=1 ./...
cover:
go test -race -coverpkg=./... -coverprofile=coverage.out ./...
@go tool cover -func=coverage.out | tail -1
build:
go build ./...
go build -o /dev/null ./cmd/arcp
doc-check:
@missing=$$(go doc -all ./... 2>&1 | grep -E "^(func|type|var|const) [A-Z]" | grep -v " //" || true); \
if [ -n "$$missing" ]; then \
echo "Public symbols missing godoc comments may exist; run 'go doc -all' to inspect."; \
fi
tidy:
go mod tidy
install:
go install ./cmd/arcp
clean:
rm -f coverage.out
conformance:
ARCP_CONFORMANCE_OUT=$$PWD/conformance.json go test ./tests/conformance/...
diagrams:
@bash docs/diagrams/render.sh 2>/dev/null || echo "(no diagrams to render)"
examples-smoke:
@go build ./examples/... && echo "examples build OK"
gates: fmt-check vet test cover build conformance
@echo "All gates passed."