-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (27 loc) · 951 Bytes
/
Makefile
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
export GOPRIVATE=github.com/ecumenos-social
export SHELL=/bin/sh
.PHONY: all
all: hooks tidy check fmt lint test tidy
.PHONY: hooks
hooks: ## Git hooks
git config core.hooksPath hooks
.PHONY: test
test: ## Run tests
go test ./...
.PHONY: tidy
tidy:
go mod tidy
.PHONY: coverage-html
coverage-html: ## Generate test coverage report and open in browser
go test ./... -coverpkg=./... -coverprofile=test-coverage.out
go tool cover -html=test-coverage.out
.PHONY: lint
lint: ## Verify code style and run static checks
go vet -asmdecl -assign -atomic -bools -buildtag -cgocall -copylocks -httpresponse -loopclosure -lostcancel -nilfunc -printf -shift -stdmethods -structtag -tests -unmarshal -unreachable -unsafeptr -unusedresult ./...
test -z $(gofmt -l ./...)
.PHONY: fmt
fmt: ## Run syntax re-formatting (modify in place)
go fmt ./...
.PHONY: check
check: ## Compile everything, checking syntax (does not output binaries)
go build ./...