Debian Codegraph @

Makefile

raw symbols SCIP
1 .PHONY: test
2
3 help:
4 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5
6 install: ## install the gocc binary
7 go install .
8
9 test: ## run all unit tests
10 go test -v ./...
11
12 gofmt: ## format all go files
13 gofmt -l -s -w .
14
15 govet: ## run go's code vetting on all code
16 go vet ./...
17
18 ci-lint: ## see https://golangci-lint.run/, applies .golangci.yml
19 golangci-lint run
20
21 lint:
22 make govet
23 ## make ci-lint ## Temporarily disabled for go 1.24 until golangci-lint supports go 1.24
24
25 goclean: gofmt ## apply go style rules to source
26
27 regenerate: ## regenerate all example and test files
28 make install
29 make -C example regenerate
30 make -C internal/test regenerate
31 make goclean
32 make lint
33
34 check: ## regenerate, lint and run a terse version of check
35 @# quietly install and regenerate
36 @go mod tidy
37 @make --quiet install
38 @make --quiet -C example regenerate
39 @make --quiet -C internal/test regenerate
40 @# promote formatting changes to errors
41 @if [ -n "$(gofmt -l -s .)" ]; then { echo "gofmt errors:"; gofmt -d -l -s . ; exit 1; }; fi
42 @make --quiet lint
43 @go test ./... | grep -v "\[no test"
44
45 ci: ## run all ci checks
46 make regenerate
47 @git diff --exit-code . || { echo "ERROR: commit and working copy differ after 'make regenerate'"; exit 22 ; }
48 make test
49 @git diff --exit-code . || { echo "ERROR: commit and working copy differ after 'make test'" ; exit 22 ; }