From 7ff544fddf4b499606113fd987a8a946e6a6f1cd Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Mon, 21 Jan 2019 13:35:34 +0800 Subject: [PATCH] Fix travis and Other Linter Errors (#1356) * fix travis and other linter errors * remove megacheck --- .gometalinter.json | 1 - beacon-chain/blockchain/fork_choice_test.go | 5 ++--- beacon-chain/chaintest/backend/helpers.go | 3 +-- beacon-chain/chaintest/backend/simulated_backend.go | 3 +-- beacon-chain/sync/initial-sync/service.go | 3 +-- shared/ssz/decode_test.go | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.gometalinter.json b/.gometalinter.json index f7d6af587..927c09f48 100644 --- a/.gometalinter.json +++ b/.gometalinter.json @@ -12,7 +12,6 @@ "golint", "gosec", "gotype", - "megacheck", "misspell", "structcheck", "unparam", diff --git a/beacon-chain/blockchain/fork_choice_test.go b/beacon-chain/blockchain/fork_choice_test.go index b8c1493d3..075700cdc 100644 --- a/beacon-chain/blockchain/fork_choice_test.go +++ b/beacon-chain/blockchain/fork_choice_test.go @@ -7,12 +7,11 @@ import ( "testing" "time" - "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" - "github.com/prysmaticlabs/prysm/beacon-chain/db" - "github.com/gogo/protobuf/proto" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/beacon-chain/core/state" + "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" + "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/internal" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" bytesutil "github.com/prysmaticlabs/prysm/shared/bytes" diff --git a/beacon-chain/chaintest/backend/helpers.go b/beacon-chain/chaintest/backend/helpers.go index 65a5230d6..7377bc42a 100644 --- a/beacon-chain/chaintest/backend/helpers.go +++ b/beacon-chain/chaintest/backend/helpers.go @@ -5,13 +5,12 @@ import ( "strconv" "time" - "github.com/prysmaticlabs/prysm/shared/trie" - "github.com/gogo/protobuf/proto" b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" + "github.com/prysmaticlabs/prysm/shared/trie" ) // Generates a simulated beacon block to use diff --git a/beacon-chain/chaintest/backend/simulated_backend.go b/beacon-chain/chaintest/backend/simulated_backend.go index 074987e6e..c128285c5 100644 --- a/beacon-chain/chaintest/backend/simulated_backend.go +++ b/beacon-chain/chaintest/backend/simulated_backend.go @@ -9,8 +9,6 @@ import ( "reflect" "time" - "github.com/prysmaticlabs/prysm/shared/trie" - "github.com/ethereum/go-ethereum/common" "github.com/gogo/protobuf/proto" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" @@ -22,6 +20,7 @@ import ( "github.com/prysmaticlabs/prysm/shared/hashutil" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/slices" + "github.com/prysmaticlabs/prysm/shared/trie" log "github.com/sirupsen/logrus" ) diff --git a/beacon-chain/sync/initial-sync/service.go b/beacon-chain/sync/initial-sync/service.go index 27817a3d4..6ebe55194 100644 --- a/beacon-chain/sync/initial-sync/service.go +++ b/beacon-chain/sync/initial-sync/service.go @@ -16,9 +16,8 @@ import ( "fmt" "time" - "github.com/prysmaticlabs/prysm/beacon-chain/core/state" - "github.com/gogo/protobuf/proto" + "github.com/prysmaticlabs/prysm/beacon-chain/core/state" "github.com/prysmaticlabs/prysm/beacon-chain/db" pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" bytesutil "github.com/prysmaticlabs/prysm/shared/bytes" diff --git a/shared/ssz/decode_test.go b/shared/ssz/decode_test.go index 6e1e41eed..09cafda96 100644 --- a/shared/ssz/decode_test.go +++ b/shared/ssz/decode_test.go @@ -56,7 +56,7 @@ var decodeTests = []decodeTest{ {input: "FFFFFFFFFFFFFFFF", ptr: new(uint64), value: uint64(18446744073709551615)}, // bytes - {input: "00000000", ptr:new([]byte), value: []byte{}}, + {input: "00000000", ptr: new([]byte), value: []byte{}}, {input: "0100000001", ptr: new([]byte), value: []byte{1}}, {input: "06000000 010203040506", ptr: new([]byte), value: []byte{1, 2, 3, 4, 5, 6}},