-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (45 loc) · 987 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
MAKEFLAGS += --no-print-directory
gosch: $(shell find . -name "*.go")
go build
.PHONY: test
test:
go vet ./...
go test ./...
@ $(MAKE) integration-tests
.PHONY: lint
lint:
golangci-lint run
.PHONY: integration-tests
integration-tests: gosch
cd examples/the-little-schemer/ && ../../gosch run-all.scm
.PHONY: cov
cov:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
.PHONY: staticcheck
staticcheck:
# go get honnef.co/go/tools/cmd/staticcheck
staticcheck ./...
.PHONY: cycl
cycl:
# go get github.com/fzipp/gocyclo/cmd/gocyclo
gocyclo -top 10 .
.PHONY: cogn
cogn:
# go get github.com/uudashr/gocognit/cmd/gocognit
gocognit -top 10 .
.PHONY: benchmarks
benchmarks:
go test -bench=. ./...
.PHONY: repl
repl: gosch
@ ./gosch
.PHONY: fmt
fmt:
go fmt ./...
.PHONY: lines
lines:
@ find . -type f \( -name "*.go" -not -name "*_test.go" \) -exec cat {} \; | grep . | wc -l
.PHONY: clean
clean:
rm -rf *.out *.html ./gosch