-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 779 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
.DEFAULT_GOAL=all
.PHONY: all
all: check-dependencies analyze-diff build test
.PHONY: analyze
analyze:
golangci-lint run ./...
go list -u -m -mod=readonly -json all\
| go-mod-outdated -ci -direct -update
.PHONY: analyze-diff
analyze-new:
golangci-lint run --new ./...
go list -u -m -mod=readonly -json all\
| go-mod-outdated -ci -direct -update
.PHONY: build
build:
go install ./...
.PHONY:
check-dependencies:
which \
go \
go-mod-outdated \
golangci-lint
.PHONY: count-analysis
count-analysis:
golangci-lint run ./...\
| grep -E "^[0-9a-zA-Z/\.\-\_].*\([0-9a-zA-Z]+\)$$"\
| sed -E 's/^[0-9a-zA-Z\/\.\-\_].*\(([0-9a-zA-Z]+)\)$$/\1/g'\
| sort\
| uniq -c\
| sort -bgr
.PHONY: test
test:
go test -count 1 -cover -race -run ".*" -timeout 10s ./...