aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: b938911aadd3bef5821945586fcee9b82a500e29 (plain) (blame)
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
GOLINT = go run golang.org/x/lint/golint
STATICCHECK = go run honnef.co/go/tools/cmd/staticcheck

.PHONY: all
all: test

.PHONY: build
build:
	go build

.PHONY: install
install:
	go install .

.PHONY: lint
lint:
	$(GOLINT) ./...

.PHONY: vet
vet:
	go vet ./...

.PHONY: staticcheck
staticcheck:
	$(STATICCHECK) -tests=false ./...

.PHONY: pretest
pretest: lint vet staticcheck

.PHONY: test
test: pretest
	go test -race ./...

.PHONY: cover
cover:
	go test -coverprofile=cover.out -covermode=atomic -coverpkg=./... ./...
	go tool cover -html=cover.out -o cover.html

.PHONY: clean
clean:
	rm -rf _tmp

.PHONY: install
run: install
	sally