From 76dea94a015d02e507538e8314b3b983d6adf3b0 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Tue, 30 Nov 2021 13:32:21 -0800 Subject: [PATCH] Remove now-unused nolint:lll directives. (#7356) --- config/config_test.go | 1 - internal/consensus/msgs_test.go | 1 - internal/evidence/reactor_test.go | 1 - internal/inspect/inspect.go | 2 -- internal/inspect/rpc/rpc.go | 2 -- internal/p2p/conn/connection_test.go | 1 - internal/p2p/metrics.go | 2 -- internal/rpc/core/mempool.go | 2 +- internal/state/indexer/sink/sink.go | 2 -- libs/pubsub/query/query_test.go | 1 - light/proxy/routes.go | 2 +- light/rpc/client.go | 4 ++-- privval/msgs_test.go | 1 - proto/tendermint/blocksync/message_test.go | 1 - rpc/client/interface.go | 2 +- rpc/client/local/local.go | 4 ++-- rpc/client/mock/client.go | 4 ++-- types/proposal_test.go | 2 +- types/vote_test.go | 4 ++-- 19 files changed, 12 insertions(+), 27 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index 304eeb0ce..b3dabfb08 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -105,7 +105,6 @@ func TestStateSyncConfigValidateBasic(t *testing.T) { } func TestConsensusConfig_ValidateBasic(t *testing.T) { - // nolint: lll testcases := map[string]struct { modify func(*ConsensusConfig) expectErr bool diff --git a/internal/consensus/msgs_test.go b/internal/consensus/msgs_test.go index c22ebf5c0..914d7dc4e 100644 --- a/internal/consensus/msgs_test.go +++ b/internal/consensus/msgs_test.go @@ -313,7 +313,6 @@ func TestWALMsgProto(t *testing.T) { } } -// nolint:lll //ignore line length for tests func TestConsMsgsVectors(t *testing.T) { date := time.Date(2018, 8, 30, 12, 0, 0, 0, time.UTC) psh := types.PartSetHeader{ diff --git a/internal/evidence/reactor_test.go b/internal/evidence/reactor_test.go index 764450cd6..7808e53fb 100644 --- a/internal/evidence/reactor_test.go +++ b/internal/evidence/reactor_test.go @@ -509,7 +509,6 @@ func TestReactorBroadcastEvidence_FullyConnected(t *testing.T) { } } -// nolint:lll func TestEvidenceListSerialization(t *testing.T) { exampleVote := func(msgType byte) *types.Vote { var stamp, err = time.Parse(types.TimeFormat, "2017-12-25T03:00:01.234Z") diff --git a/internal/inspect/inspect.go b/internal/inspect/inspect.go index 3bc744e4c..eb75d94a3 100644 --- a/internal/inspect/inspect.go +++ b/internal/inspect/inspect.go @@ -41,8 +41,6 @@ type Inspector struct { // The Inspector type does not modify the state or block stores. // The sinks are used to enable block and transaction querying via the RPC server. // The caller is responsible for starting and stopping the Inspector service. -/// -//nolint:lll func New(cfg *config.RPCConfig, bs state.BlockStore, ss state.Store, es []indexer.EventSink, logger log.Logger) *Inspector { eb := eventbus.NewDefault(logger.With("module", "events")) diff --git a/internal/inspect/rpc/rpc.go b/internal/inspect/rpc/rpc.go index 276bfe082..be83b1b1e 100644 --- a/internal/inspect/rpc/rpc.go +++ b/internal/inspect/rpc/rpc.go @@ -31,8 +31,6 @@ type eventBusUnsubscriber interface { } // Routes returns the set of routes used by the Inspector server. -// -//nolint: lll func Routes(cfg config.RPCConfig, s state.Store, bs state.BlockStore, es []indexer.EventSink, logger log.Logger) core.RoutesMap { env := &core.Environment{ Config: cfg, diff --git a/internal/p2p/conn/connection_test.go b/internal/p2p/conn/connection_test.go index dc198d8bd..f8b34bad6 100644 --- a/internal/p2p/conn/connection_test.go +++ b/internal/p2p/conn/connection_test.go @@ -555,7 +555,6 @@ func TestMConnectionTrySend(t *testing.T) { assert.Equal(t, "TrySend", <-resultCh) } -// nolint:lll //ignore line length for tests func TestConnVectors(t *testing.T) { testCases := []struct { diff --git a/internal/p2p/metrics.go b/internal/p2p/metrics.go index 3677180de..2780d221e 100644 --- a/internal/p2p/metrics.go +++ b/internal/p2p/metrics.go @@ -63,8 +63,6 @@ type Metrics struct { // PrometheusMetrics returns Metrics build using Prometheus client library. // Optionally, labels can be provided along with their values ("foo", // "fooValue"). -// -// nolint: lll func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { labels := []string{} for i := 0; i < len(labelsAndValues); i += 2 { diff --git a/internal/rpc/core/mempool.go b/internal/rpc/core/mempool.go index 5b12a6c2b..87136a532 100644 --- a/internal/rpc/core/mempool.go +++ b/internal/rpc/core/mempool.go @@ -59,7 +59,7 @@ func (env *Environment) BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*co // BroadcastTxCommit returns with the responses from CheckTx and DeliverTx. // More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit -func (env *Environment) BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { //nolint:lll +func (env *Environment) BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { resCh := make(chan *abci.Response, 1) err := env.Mempool.CheckTx( ctx.Context(), diff --git a/internal/state/indexer/sink/sink.go b/internal/state/indexer/sink/sink.go index b4c41ec31..cae861416 100644 --- a/internal/state/indexer/sink/sink.go +++ b/internal/state/indexer/sink/sink.go @@ -13,8 +13,6 @@ import ( // EventSinksFromConfig constructs a slice of indexer.EventSink using the provided // configuration. -// -//nolint:lll func EventSinksFromConfig(cfg *config.Config, dbProvider config.DBProvider, chainID string) ([]indexer.EventSink, error) { if len(cfg.TxIndex.Indexer) == 0 { return []indexer.EventSink{null.NewEventSink()}, nil diff --git a/libs/pubsub/query/query_test.go b/libs/pubsub/query/query_test.go index 883e771c6..b0d1fb7fe 100644 --- a/libs/pubsub/query/query_test.go +++ b/libs/pubsub/query/query_test.go @@ -66,7 +66,6 @@ func TestCompiledMatches(t *testing.T) { txTime = "2018-05-03T14:45:00Z" ) - //nolint:lll testCases := []struct { s string events []types.Event diff --git a/light/proxy/routes.go b/light/proxy/routes.go index 436ae1b76..659cb5051 100644 --- a/light/proxy/routes.go +++ b/light/proxy/routes.go @@ -77,7 +77,7 @@ func makeNetInfoFunc(c *lrpc.Client) rpcNetInfoFunc { } } -type rpcBlockchainInfoFunc func(ctx *rpctypes.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) //nolint:lll +type rpcBlockchainInfoFunc func(ctx *rpctypes.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) func makeBlockchainInfoFunc(c *lrpc.Client) rpcBlockchainInfoFunc { return func(ctx *rpctypes.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { diff --git a/light/rpc/client.go b/light/rpc/client.go index 6143338f4..51676dd3e 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -122,7 +122,7 @@ func (c *Client) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error } // ABCIQuery requests proof by default. -func (c *Client) ABCIQuery(ctx context.Context, path string, data tmbytes.HexBytes) (*coretypes.ResultABCIQuery, error) { //nolint:lll +func (c *Client) ABCIQuery(ctx context.Context, path string, data tmbytes.HexBytes) (*coretypes.ResultABCIQuery, error) { return c.ABCIQueryWithOptions(ctx, path, data, rpcclient.DefaultABCIQueryOptions) } @@ -263,7 +263,7 @@ func (c *Client) Health(ctx context.Context) (*coretypes.ResultHealth, error) { // BlockchainInfo calls rpcclient#BlockchainInfo and then verifies every header // returned. -func (c *Client) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { //nolint:lll +func (c *Client) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { res, err := c.next.BlockchainInfo(ctx, minHeight, maxHeight) if err != nil { return nil, err diff --git a/privval/msgs_test.go b/privval/msgs_test.go index 7ac9f2c5d..43752749b 100644 --- a/privval/msgs_test.go +++ b/privval/msgs_test.go @@ -57,7 +57,6 @@ func exampleProposal() *types.Proposal { } } -// nolint:lll // ignore line length for tests func TestPrivvalVectors(t *testing.T) { pk := ed25519.GenPrivKeyFromSecret([]byte("it's a secret")).PubKey() ppk, err := encoding.PubKeyToProto(pk) diff --git a/proto/tendermint/blocksync/message_test.go b/proto/tendermint/blocksync/message_test.go index f81de149f..3406c6dff 100644 --- a/proto/tendermint/blocksync/message_test.go +++ b/proto/tendermint/blocksync/message_test.go @@ -84,7 +84,6 @@ func TestStatusResponse_Validate(t *testing.T) { } } -// nolint:lll func TestBlockchainMessageVectors(t *testing.T) { block := types.MakeBlock(int64(3), []types.Tx{types.Tx("Hello World")}, nil, nil) block.Version.Block = 11 // overwrite updated protocol version diff --git a/rpc/client/interface.go b/rpc/client/interface.go index 8d160b799..0fbc55717 100644 --- a/rpc/client/interface.go +++ b/rpc/client/interface.go @@ -134,7 +134,7 @@ type EventsClient interface { // // ctx cannot be used to unsubscribe. To unsubscribe, use either Unsubscribe // or UnsubscribeAll. - Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan coretypes.ResultEvent, err error) //nolint:lll + Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan coretypes.ResultEvent, err error) // Unsubscribe unsubscribes given subscriber from query. Unsubscribe(ctx context.Context, subscriber, query string) error // UnsubscribeAll unsubscribes given subscriber from all the queries. diff --git a/rpc/client/local/local.go b/rpc/client/local/local.go index cb5a0a5ed..10b2b4be7 100644 --- a/rpc/client/local/local.go +++ b/rpc/client/local/local.go @@ -141,7 +141,7 @@ func (c *Local) Health(ctx context.Context) (*coretypes.ResultHealth, error) { return c.env.Health(c.ctx) } -func (c *Local) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { //nolint:lll +func (c *Local) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { return c.env.BlockchainInfo(c.ctx, minHeight, maxHeight) } @@ -169,7 +169,7 @@ func (c *Local) Commit(ctx context.Context, height *int64) (*coretypes.ResultCom return c.env.Commit(c.ctx, height) } -func (c *Local) Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error) { //nolint:lll +func (c *Local) Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error) { return c.env.Validators(c.ctx, height, page, perPage) } diff --git a/rpc/client/mock/client.go b/rpc/client/mock/client.go index a1a42e28d..b57e661cb 100644 --- a/rpc/client/mock/client.go +++ b/rpc/client/mock/client.go @@ -131,7 +131,7 @@ func (c Client) Health(ctx context.Context) (*coretypes.ResultHealth, error) { return c.env.Health(&rpctypes.Context{}) } -func (c Client) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { //nolint:lll +func (c Client) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { return c.env.BlockchainInfo(&rpctypes.Context{}, minHeight, maxHeight) } @@ -151,7 +151,7 @@ func (c Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCom return c.env.Commit(&rpctypes.Context{}, height) } -func (c Client) Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error) { //nolint:lll +func (c Client) Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error) { return c.env.Validators(&rpctypes.Context{}, height, page, perPage) } diff --git a/types/proposal_test.go b/types/proposal_test.go index 47f5a8890..e692a65a9 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -49,7 +49,7 @@ func TestProposalSignable(t *testing.T) { func TestProposalString(t *testing.T) { str := testProposal.String() - expected := `Proposal{12345/23456 (2D2D4A756E655F31355F323032305F616D696E6F5F7761735F72656D6F766564:111:2D2D4A756E65, -1) 000000000000 @ 2018-02-11T07:09:22.765Z}` //nolint:lll // ignore line length for tests + expected := `Proposal{12345/23456 (2D2D4A756E655F31355F323032305F616D696E6F5F7761735F72656D6F766564:111:2D2D4A756E65, -1) 000000000000 @ 2018-02-11T07:09:22.765Z}` if str != expected { t.Errorf("got unexpected string for Proposal. Expected:\n%v\nGot:\n%v", expected, str) } diff --git a/types/vote_test.go b/types/vote_test.go index bfd1c4164..3ffb60324 100644 --- a/types/vote_test.go +++ b/types/vote_test.go @@ -220,13 +220,13 @@ func TestVoteVerify(t *testing.T) { func TestVoteString(t *testing.T) { str := examplePrecommit().String() - expected := `Vote{56789:6AF1F4111082 12345/02/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 8B01023386C3 000000000000 @ 2017-12-25T03:00:01.234Z}` //nolint:lll //ignore line length for tests + expected := `Vote{56789:6AF1F4111082 12345/02/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 8B01023386C3 000000000000 @ 2017-12-25T03:00:01.234Z}` if str != expected { t.Errorf("got unexpected string for Vote. Expected:\n%v\nGot:\n%v", expected, str) } str2 := examplePrevote().String() - expected = `Vote{56789:6AF1F4111082 12345/02/SIGNED_MSG_TYPE_PREVOTE(Prevote) 8B01023386C3 000000000000 @ 2017-12-25T03:00:01.234Z}` //nolint:lll //ignore line length for tests + expected = `Vote{56789:6AF1F4111082 12345/02/SIGNED_MSG_TYPE_PREVOTE(Prevote) 8B01023386C3 000000000000 @ 2017-12-25T03:00:01.234Z}` if str2 != expected { t.Errorf("got unexpected string for Vote. Expected:\n%v\nGot:\n%v", expected, str2) }