提交 03738223 作者: Steven Allen

build: switch from megacheck to golangci-lint

(which includes megacheck)

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 4924b80e
...@@ -136,7 +136,7 @@ help: ...@@ -136,7 +136,7 @@ help:
@echo ' test_go_test - Run all go tests' @echo ' test_go_test - Run all go tests'
@echo ' test_go_expensive - Run all go tests and compile on all platforms' @echo ' test_go_expensive - Run all go tests and compile on all platforms'
@echo ' test_go_race - Run go tests with the race detector enabled' @echo ' test_go_race - Run go tests with the race detector enabled'
@echo ' test_go_megacheck - Run the `megacheck` vetting tool' @echo ' test_go_lint - Run the `golangci-lint` vetting tool'
@echo ' test_sharness_short - Run short sharness tests' @echo ' test_sharness_short - Run short sharness tests'
@echo ' test_sharness_expensive - Run all sharness tests' @echo ' test_sharness_expensive - Run all sharness tests'
@echo ' coverage - Collects coverage info from unit tests and sharness' @echo ' coverage - Collects coverage info from unit tests and sharness'
......
...@@ -12,6 +12,7 @@ require ( ...@@ -12,6 +12,7 @@ require (
github.com/fatih/color v1.7.0 // indirect github.com/fatih/color v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.4.7 github.com/fsnotify/fsnotify v1.4.7
github.com/gogo/protobuf v1.2.1 github.com/gogo/protobuf v1.2.1
github.com/golangci/golangci-lint v1.16.0
github.com/hashicorp/go-multierror v1.0.0 github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/golang-lru v0.5.1 github.com/hashicorp/golang-lru v0.5.1
github.com/hsanjuan/go-libp2p-http v0.0.2 github.com/hsanjuan/go-libp2p-http v0.0.2
...@@ -120,9 +121,9 @@ require ( ...@@ -120,9 +121,9 @@ require (
go.uber.org/goleak v0.10.0 // indirect go.uber.org/goleak v0.10.0 // indirect
go.uber.org/multierr v1.1.0 // indirect go.uber.org/multierr v1.1.0 // indirect
golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6 // indirect golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6 // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190426135247-a129542de9ae golang.org/x/sys v0.0.0-20190426135247-a129542de9ae
golang.org/x/text v0.3.2 // indirect golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a // indirect
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373 // indirect golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 gopkg.in/cheggaaa/pb.v1 v1.0.28
gotest.tools/gotestsum v0.3.4 gotest.tools/gotestsum v0.3.4
......
...@@ -65,10 +65,9 @@ test_go_fmt: ...@@ -65,10 +65,9 @@ test_go_fmt:
.PHONY: test_go_fmt .PHONY: test_go_fmt
TEST_GO += test_go_fmt TEST_GO += test_go_fmt
test_go_megacheck: test_go_lint: test/bin/golangci-lint
@$(GOCC) get honnef.co/go/tools/cmd/megacheck golangci-lint run ./...
@for pkg in $(go-pkgs); do megacheck "$$pkg"; done .PHONY: test_go_lint
.PHONY: megacheck
test_go: $(TEST_GO) test_go: $(TEST_GO)
......
...@@ -54,6 +54,9 @@ $(d)/gocovmerge: ...@@ -54,6 +54,9 @@ $(d)/gocovmerge:
$(call go-build,github.com/Kubuxu/gocovmerge) $(call go-build,github.com/Kubuxu/gocovmerge)
TGTS_$(d) += $(d)/gocovmerge TGTS_$(d) += $(d)/gocovmerge
$(d)/golangci-lint:
$(call go-build,github.com/golangci/golangci-lint/cmd/golangci-lint)
TGTS_$(d) += $(d)/golangci-lint
$(TGTS_$(d)): $$(DEPS_GO) $(TGTS_$(d)): $$(DEPS_GO)
......
...@@ -4,6 +4,7 @@ package tools ...@@ -4,6 +4,7 @@ package tools
import ( import (
_ "github.com/Kubuxu/gocovmerge" _ "github.com/Kubuxu/gocovmerge"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/ipfs/go-cidutil/cid-fmt" _ "github.com/ipfs/go-cidutil/cid-fmt"
_ "github.com/ipfs/hang-fds" _ "github.com/ipfs/hang-fds"
_ "github.com/jbenet/go-random-files/random-files" _ "github.com/jbenet/go-random-files/random-files"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论