Skip to content

Commit

Permalink
fix CI and switch to golangci-lint (#1471)
Browse files Browse the repository at this point in the history
Signed-off-by: rleungx <rleungx@gmail.com>
  • Loading branch information
rleungx authored and disksing committed Mar 21, 2019
1 parent e1c1ae4 commit f72cc23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 35 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ retool-setup:

check: retool-setup check-all

static: export GO111MODULE=on
static:
@ # Not running vet and fmt through metalinter becauase it ends up looking at vendor
gofmt -s -l $$($(PACKAGE_DIRECTORIES)) 2>&1 | $(GOCHECKER)
./scripts/retool do govet --shadow $$($(PACKAGE_DIRECTORIES)) 2>&1 | $(GOCHECKER)

CGO_ENABLED=0 ./scripts/retool do gometalinter.v2 --disable-all --deadline 120s \
CGO_ENABLED=0 ./scripts/retool do golangci-lint run --disable-all --deadline 120s \
--enable misspell \
--enable megacheck \
--enable staticcheck \
--enable ineffassign \
$$($(PACKAGE_DIRECTORIES))

Expand Down
2 changes: 1 addition & 1 deletion server/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func (c *coordinator) stop() {
c.cancel()
}

// Hack to retrive info from scheduler.
// Hack to retrieve info from scheduler.
// TODO: remove it.
type hasHotStatus interface {
GetHotReadStatus() *core.StoreHotRegionInfos
Expand Down
36 changes: 4 additions & 32 deletions tools.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,24 @@
{
"Tools": [
{
"Repository": "honnef.co/go/tools/cmd/megacheck",
"Commit": "ae8f1f9103cc7cdcb6b573bfa8c94c820663f391"
},
{
"Repository": "gopkg.in/alecthomas/gometalinter.v2",
"Commit": "46cc1ea3778b247666c2949669a3333c532fa9c6"
},
{
"Repository": "github.com/kisielk/errcheck",
"Commit": "55d8f507faff4d6eddd0c41a3e713e2567fca4e5"
},
{
"Repository": "github.com/cockroachdb/returncheck",
"Commit": "e91bb28baf9de4a530d3ae7f041953b23dcce9be"
},
{
"Repository": "github.com/mgechev/revive",
"Commit": "7773f47324c2bf1c8f7a5500aff2b6c01d3ed73b"
},
{
"Repository": "github.com/gordonklaus/ineffassign",
"Commit": "7bae11eba15a3285c75e388f77eb6357a2d73ee2"
},
{
"Repository": "github.com/dnephin/govet",
"Commit": "4a96d43e39d340b63daa8bc5576985aa599885f6"
},
{
"Repository": "github.com/client9/misspell/cmd/misspell",
"Commit": "7888c6b6ce89353cd98e196bce3c3f9e4cdf31f6"
},
{
"Repository": "github.com/securego/gosec",
"Commit": "5fb530cda357c16175f2c049577d2030de735b28"
},
{
"Repository": "github.com/securego/gosec/cmd/gosec",
"Commit": "5fb530cda357c16175f2c049577d2030de735b28"
},
{
"Repository": "github.com/pingcap/gofail",
"Commit": "c3f835e5a7d8cedf2f61cc55f961d4d120ae90eb"
},
{
"Repository": "github.com/go-playground/overalls",
"Commit": "22ec1a223b7c9a2e56355bd500b539cba3784238"
},
{
"Repository": "github.com/golangci/golangci-lint/cmd/golangci-lint",
"Commit": "901cf25e20f86b7e9dc6f73eaba5afbd0cbdc257"
}
],
"RetoolVersion": "1.3.7"
Expand Down

0 comments on commit f72cc23

Please sign in to comment.