Merge pull request #1679 from cfromknecht/move-linter-v2

Makefile: move linter v2
This commit is contained in:
Olaoluwa Osuntokun 2018-08-09 21:03:05 -07:00 committed by GitHub
commit 518b0d2cf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 11 deletions

@ -5,14 +5,14 @@ DEP_PKG := github.com/golang/dep/cmd/dep
BTCD_PKG := github.com/btcsuite/btcd
GLIDE_PKG := github.com/Masterminds/glide
GOVERALLS_PKG := github.com/mattn/goveralls
LINT_PKG := gopkg.in/alecthomas/gometalinter.v1
LINT_PKG := gopkg.in/alecthomas/gometalinter.v2
GO_BIN := ${GOPATH}/bin
DEP_BIN := $(GO_BIN)/dep
BTCD_BIN := $(GO_BIN)/btcd
GLIDE_BIN := $(GO_BIN)/glide
GOVERALLS_BIN := $(GO_BIN)/goveralls
LINT_BIN := $(GO_BIN)/gometalinter.v1
LINT_BIN := $(GO_BIN)/gometalinter.v2
HAVE_DEP := $(shell command -v $(DEP_BIN) 2> /dev/null)
HAVE_BTCD := $(shell command -v $(BTCD_BIN) 2> /dev/null)
@ -101,7 +101,7 @@ $(GOVERALLS_BIN):
go get -u $(GOVERALLS_PKG)
$(LINT_BIN):
@$(call print, "Fetching gometalinter.v1")
@$(call print, "Fetching gometalinter.v2")
go get -u $(LINT_PKG)
$(GOINSTALL) $(LINT_PKG)
@ -179,13 +179,13 @@ flake-unit:
# ======
ifeq ($(RACE), false)
travis: lint scratch itest unit-cover $(GOVERALLS_BIN)
travis: dep lint build itest unit-cover $(GOVERALLS_BIN)
@$(call print, "Sending coverage report.")
$(GOVERALLS_BIN) -coverprofile=profile.cov -service=travis-ci
endif
ifeq ($(RACE), true)
travis: lint dep btcd unit-race
travis: dep lint btcd unit-race
endif

@ -227,7 +227,10 @@ func TestCircuitMapPersistence(t *testing.T) {
cfg, circuitMap := newCircuitMap(t)
circuit := circuitMap.LookupCircuit(htlcswitch.CircuitKey{chan1, 0})
circuit := circuitMap.LookupCircuit(htlcswitch.CircuitKey{
ChanID: chan1,
HtlcID: 0,
})
if circuit != nil {
t.Fatalf("LookupByHTLC returned a circuit before any were added: %v",
circuit)

@ -242,8 +242,8 @@ func testFilterBlockNotifications(node *rpctest.Harness,
// Now we'll add both outpoints to the current filter.
filter := []channeldb.EdgePoint{
{targetScript, *outPoint1},
{targetScript, *outPoint2},
{FundingPkScript: targetScript, OutPoint: *outPoint1},
{FundingPkScript: targetScript, OutPoint: *outPoint2},
}
err = chainView.UpdateFilter(filter, uint32(currentHeight))
if err != nil {
@ -388,7 +388,7 @@ func testUpdateFilterBackTrack(node *rpctest.Harness,
// After the block has been mined+notified we'll update the filter with
// a _prior_ height so a "rewind" occurs.
filter := []channeldb.EdgePoint{
{testScript, *outPoint},
{FundingPkScript: testScript, OutPoint: *outPoint},
}
err = chainView.UpdateFilter(filter, uint32(currentHeight))
if err != nil {
@ -503,8 +503,8 @@ func testFilterSingleBlock(node *rpctest.Harness, chainView FilteredChainView,
// Now we'll manually trigger filtering the block generated above.
// First, we'll add the two outpoints to our filter.
filter := []channeldb.EdgePoint{
{testScript, *outPoint1},
{testScript, *outPoint2},
{FundingPkScript: testScript, OutPoint: *outPoint1},
{FundingPkScript: testScript, OutPoint: *outPoint2},
}
err = chainView.UpdateFilter(filter, uint32(currentHeight))
if err != nil {