forked from smallnest/weighted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 916 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
WORKDIR=`pwd`
default: build
install:
go get github.com/smallnest/weighted
vet:
go vet .
tools:
go get -u honnef.co/go/tools/cmd/staticcheck
go get -u honnef.co/go/tools/cmd/gosimple
go get -u honnef.co/go/tools/cmd/unused
go get -u github.com/gordonklaus/ineffassign
go get -u github.com/fzipp/gocyclo
go get -u github.com/golang/lint/golint
lint:
golint ./...
staticcheck:
staticcheck -ignore "$(shell cat .checkignore)" .
gosimple:
# gosimple -ignore "$(shell cat .gosimpleignore)" .
gosimple .
unused:
unused .
gocyclo:
@ gocyclo -over 20 $(shell find . -name "*.go" |egrep -v "pb\.go|_test\.go")
check: staticcheck gosimple unused gocyclo
doc:
godoc -http=:6060
deps:
go list -f '{{ join .Deps "\n"}}' . |grep "/" | grep -v "github.com/smallnest/weighted"| grep "\." | sort |uniq
fmt:
go fmt .
build:
go build .
test:
go test -race -v .
bench:
go test -v -benchmem -bench .