This repository was archived by the owner on Dec 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +53
-1
lines changed
Expand file tree Collapse file tree 2 files changed +53
-1
lines changed Original file line number Diff line number Diff line change 1212 - tip
1313
1414script :
15- - go test -v ./...
15+ - make check
Original file line number Diff line number Diff line change 1+ PKGS := github.com/pkg/errors
2+ SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS ) )
3+ GO := go
4+
5+ check : test vet gofmt unused misspell unconvert gosimple ineffassign
6+
7+ test :
8+ $(GO ) test $(PKGS )
9+
10+ vet : | test
11+ $(GO ) vet $(PKGS )
12+
13+ staticcheck :
14+ $(GO ) get honnef.co/go/tools/cmd/staticcheck
15+ staticcheck $(PKGS )
16+
17+ unused :
18+ $(GO ) get honnef.co/go/tools/cmd/unused
19+ unused -exported $(PKGS )
20+
21+ misspell :
22+ $(GO ) get github.com/client9/misspell/cmd/misspell
23+ misspell \
24+ -locale GB \
25+ -error \
26+ * .md * .go
27+
28+ unconvert :
29+ $(GO ) get github.com/mdempsky/unconvert
30+ unconvert -v $(PKGS )
31+
32+ gosimple :
33+ $(GO ) get honnef.co/go/tools/cmd/gosimple
34+ gosimple $(PKGS )
35+
36+ ineffassign :
37+ $(GO ) get github.com/gordonklaus/ineffassign
38+ find $(SRCDIRS ) -name ' *.go' | xargs ineffassign
39+
40+ pedantic : check unparam errcheck staticcheck
41+
42+ unparam :
43+ $(GO ) get mvdan.cc/unparam
44+ unparam ./...
45+
46+ errcheck :
47+ $(GO ) get github.com/kisielk/errcheck
48+ errcheck $(PKGS )
49+
50+ gofmt :
51+ @echo Checking code is gofmted
52+ @test -z " $( shell gofmt -s -l -d -e $( SRCDIRS) | tee /dev/stderr) "
You can’t perform that action at this time.
0 commit comments