|
@@ -2,7 +2,7 @@ PKGS := github.com/pkg/errors
|
|
|
SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS))
|
|
SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS))
|
|
|
GO := go
|
|
GO := go
|
|
|
|
|
|
|
|
-check: test vet gofmt unused misspell unconvert gosimple ineffassign
|
|
|
|
|
|
|
+check: test vet gofmt misspell unconvert staticcheck ineffassign unparam
|
|
|
|
|
|
|
|
test:
|
|
test:
|
|
|
$(GO) test $(PKGS)
|
|
$(GO) test $(PKGS)
|
|
@@ -12,11 +12,7 @@ vet: | test
|
|
|
|
|
|
|
|
staticcheck:
|
|
staticcheck:
|
|
|
$(GO) get honnef.co/go/tools/cmd/staticcheck
|
|
$(GO) get honnef.co/go/tools/cmd/staticcheck
|
|
|
- staticcheck $(PKGS)
|
|
|
|
|
-
|
|
|
|
|
-unused:
|
|
|
|
|
- $(GO) get honnef.co/go/tools/cmd/unused
|
|
|
|
|
- unused -exported $(PKGS)
|
|
|
|
|
|
|
+ staticcheck -checks all $(PKGS)
|
|
|
|
|
|
|
|
misspell:
|
|
misspell:
|
|
|
$(GO) get github.com/client9/misspell/cmd/misspell
|
|
$(GO) get github.com/client9/misspell/cmd/misspell
|
|
@@ -29,15 +25,11 @@ unconvert:
|
|
|
$(GO) get github.com/mdempsky/unconvert
|
|
$(GO) get github.com/mdempsky/unconvert
|
|
|
unconvert -v $(PKGS)
|
|
unconvert -v $(PKGS)
|
|
|
|
|
|
|
|
-gosimple:
|
|
|
|
|
- $(GO) get honnef.co/go/tools/cmd/gosimple
|
|
|
|
|
- gosimple $(PKGS)
|
|
|
|
|
-
|
|
|
|
|
ineffassign:
|
|
ineffassign:
|
|
|
$(GO) get github.com/gordonklaus/ineffassign
|
|
$(GO) get github.com/gordonklaus/ineffassign
|
|
|
find $(SRCDIRS) -name '*.go' | xargs ineffassign
|
|
find $(SRCDIRS) -name '*.go' | xargs ineffassign
|
|
|
|
|
|
|
|
-pedantic: check unparam errcheck staticcheck
|
|
|
|
|
|
|
+pedantic: check errcheck
|
|
|
|
|
|
|
|
unparam:
|
|
unparam:
|
|
|
$(GO) get mvdan.cc/unparam
|
|
$(GO) get mvdan.cc/unparam
|