Browse Source

Remove now-unused nolint:lll directives. (#7356)

pull/7359/head
M. J. Fromberger 3 years ago
committed by GitHub
parent
commit
76dea94a01
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 12 additions and 27 deletions
  1. +0
    -1
      config/config_test.go
  2. +0
    -1
      internal/consensus/msgs_test.go
  3. +0
    -1
      internal/evidence/reactor_test.go
  4. +0
    -2
      internal/inspect/inspect.go
  5. +0
    -2
      internal/inspect/rpc/rpc.go
  6. +0
    -1
      internal/p2p/conn/connection_test.go
  7. +0
    -2
      internal/p2p/metrics.go
  8. +1
    -1
      internal/rpc/core/mempool.go
  9. +0
    -2
      internal/state/indexer/sink/sink.go
  10. +0
    -1
      libs/pubsub/query/query_test.go
  11. +1
    -1
      light/proxy/routes.go
  12. +2
    -2
      light/rpc/client.go
  13. +0
    -1
      privval/msgs_test.go
  14. +0
    -1
      proto/tendermint/blocksync/message_test.go
  15. +1
    -1
      rpc/client/interface.go
  16. +2
    -2
      rpc/client/local/local.go
  17. +2
    -2
      rpc/client/mock/client.go
  18. +1
    -1
      types/proposal_test.go
  19. +2
    -2
      types/vote_test.go

+ 0
- 1
config/config_test.go View File

@ -105,7 +105,6 @@ func TestStateSyncConfigValidateBasic(t *testing.T) {
} }
func TestConsensusConfig_ValidateBasic(t *testing.T) { func TestConsensusConfig_ValidateBasic(t *testing.T) {
// nolint: lll
testcases := map[string]struct { testcases := map[string]struct {
modify func(*ConsensusConfig) modify func(*ConsensusConfig)
expectErr bool expectErr bool


+ 0
- 1
internal/consensus/msgs_test.go View File

@ -313,7 +313,6 @@ func TestWALMsgProto(t *testing.T) {
} }
} }
// nolint:lll //ignore line length for tests
func TestConsMsgsVectors(t *testing.T) { func TestConsMsgsVectors(t *testing.T) {
date := time.Date(2018, 8, 30, 12, 0, 0, 0, time.UTC) date := time.Date(2018, 8, 30, 12, 0, 0, 0, time.UTC)
psh := types.PartSetHeader{ psh := types.PartSetHeader{


+ 0
- 1
internal/evidence/reactor_test.go View File

@ -509,7 +509,6 @@ func TestReactorBroadcastEvidence_FullyConnected(t *testing.T) {
} }
} }
// nolint:lll
func TestEvidenceListSerialization(t *testing.T) { func TestEvidenceListSerialization(t *testing.T) {
exampleVote := func(msgType byte) *types.Vote { exampleVote := func(msgType byte) *types.Vote {
var stamp, err = time.Parse(types.TimeFormat, "2017-12-25T03:00:01.234Z") var stamp, err = time.Parse(types.TimeFormat, "2017-12-25T03:00:01.234Z")


+ 0
- 2
internal/inspect/inspect.go View File

@ -41,8 +41,6 @@ type Inspector struct {
// The Inspector type does not modify the state or block stores. // 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 sinks are used to enable block and transaction querying via the RPC server.
// The caller is responsible for starting and stopping the Inspector service. // 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 { 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")) eb := eventbus.NewDefault(logger.With("module", "events"))


+ 0
- 2
internal/inspect/rpc/rpc.go View File

@ -31,8 +31,6 @@ type eventBusUnsubscriber interface {
} }
// Routes returns the set of routes used by the Inspector server. // 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 { func Routes(cfg config.RPCConfig, s state.Store, bs state.BlockStore, es []indexer.EventSink, logger log.Logger) core.RoutesMap {
env := &core.Environment{ env := &core.Environment{
Config: cfg, Config: cfg,


+ 0
- 1
internal/p2p/conn/connection_test.go View File

@ -555,7 +555,6 @@ func TestMConnectionTrySend(t *testing.T) {
assert.Equal(t, "TrySend", <-resultCh) assert.Equal(t, "TrySend", <-resultCh)
} }
// nolint:lll //ignore line length for tests
func TestConnVectors(t *testing.T) { func TestConnVectors(t *testing.T) {
testCases := []struct { testCases := []struct {


+ 0
- 2
internal/p2p/metrics.go View File

@ -63,8 +63,6 @@ type Metrics struct {
// PrometheusMetrics returns Metrics build using Prometheus client library. // PrometheusMetrics returns Metrics build using Prometheus client library.
// Optionally, labels can be provided along with their values ("foo", // Optionally, labels can be provided along with their values ("foo",
// "fooValue"). // "fooValue").
//
// nolint: lll
func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
labels := []string{} labels := []string{}
for i := 0; i < len(labelsAndValues); i += 2 { for i := 0; i < len(labelsAndValues); i += 2 {


+ 1
- 1
internal/rpc/core/mempool.go View File

@ -59,7 +59,7 @@ func (env *Environment) BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*co
// BroadcastTxCommit returns with the responses from CheckTx and DeliverTx. // BroadcastTxCommit returns with the responses from CheckTx and DeliverTx.
// More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit // 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) resCh := make(chan *abci.Response, 1)
err := env.Mempool.CheckTx( err := env.Mempool.CheckTx(
ctx.Context(), ctx.Context(),


+ 0
- 2
internal/state/indexer/sink/sink.go View File

@ -13,8 +13,6 @@ import (
// EventSinksFromConfig constructs a slice of indexer.EventSink using the provided // EventSinksFromConfig constructs a slice of indexer.EventSink using the provided
// configuration. // configuration.
//
//nolint:lll
func EventSinksFromConfig(cfg *config.Config, dbProvider config.DBProvider, chainID string) ([]indexer.EventSink, error) { func EventSinksFromConfig(cfg *config.Config, dbProvider config.DBProvider, chainID string) ([]indexer.EventSink, error) {
if len(cfg.TxIndex.Indexer) == 0 { if len(cfg.TxIndex.Indexer) == 0 {
return []indexer.EventSink{null.NewEventSink()}, nil return []indexer.EventSink{null.NewEventSink()}, nil


+ 0
- 1
libs/pubsub/query/query_test.go View File

@ -66,7 +66,6 @@ func TestCompiledMatches(t *testing.T) {
txTime = "2018-05-03T14:45:00Z" txTime = "2018-05-03T14:45:00Z"
) )
//nolint:lll
testCases := []struct { testCases := []struct {
s string s string
events []types.Event events []types.Event


+ 1
- 1
light/proxy/routes.go View File

@ -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 { func makeBlockchainInfoFunc(c *lrpc.Client) rpcBlockchainInfoFunc {
return func(ctx *rpctypes.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { return func(ctx *rpctypes.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) {


+ 2
- 2
light/rpc/client.go View File

@ -122,7 +122,7 @@ func (c *Client) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error
} }
// ABCIQuery requests proof by default. // 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) 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 // BlockchainInfo calls rpcclient#BlockchainInfo and then verifies every header
// returned. // 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) res, err := c.next.BlockchainInfo(ctx, minHeight, maxHeight)
if err != nil { if err != nil {
return nil, err return nil, err


+ 0
- 1
privval/msgs_test.go View File

@ -57,7 +57,6 @@ func exampleProposal() *types.Proposal {
} }
} }
// nolint:lll // ignore line length for tests
func TestPrivvalVectors(t *testing.T) { func TestPrivvalVectors(t *testing.T) {
pk := ed25519.GenPrivKeyFromSecret([]byte("it's a secret")).PubKey() pk := ed25519.GenPrivKeyFromSecret([]byte("it's a secret")).PubKey()
ppk, err := encoding.PubKeyToProto(pk) ppk, err := encoding.PubKeyToProto(pk)


+ 0
- 1
proto/tendermint/blocksync/message_test.go View File

@ -84,7 +84,6 @@ func TestStatusResponse_Validate(t *testing.T) {
} }
} }
// nolint:lll
func TestBlockchainMessageVectors(t *testing.T) { func TestBlockchainMessageVectors(t *testing.T) {
block := types.MakeBlock(int64(3), []types.Tx{types.Tx("Hello World")}, nil, nil) block := types.MakeBlock(int64(3), []types.Tx{types.Tx("Hello World")}, nil, nil)
block.Version.Block = 11 // overwrite updated protocol version block.Version.Block = 11 // overwrite updated protocol version


+ 1
- 1
rpc/client/interface.go View File

@ -134,7 +134,7 @@ type EventsClient interface {
// //
// ctx cannot be used to unsubscribe. To unsubscribe, use either Unsubscribe // ctx cannot be used to unsubscribe. To unsubscribe, use either Unsubscribe
// or UnsubscribeAll. // 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 unsubscribes given subscriber from query.
Unsubscribe(ctx context.Context, subscriber, query string) error Unsubscribe(ctx context.Context, subscriber, query string) error
// UnsubscribeAll unsubscribes given subscriber from all the queries. // UnsubscribeAll unsubscribes given subscriber from all the queries.


+ 2
- 2
rpc/client/local/local.go View File

@ -141,7 +141,7 @@ func (c *Local) Health(ctx context.Context) (*coretypes.ResultHealth, error) {
return c.env.Health(c.ctx) 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) 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) 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) return c.env.Validators(c.ctx, height, page, perPage)
} }


+ 2
- 2
rpc/client/mock/client.go View File

@ -131,7 +131,7 @@ func (c Client) Health(ctx context.Context) (*coretypes.ResultHealth, error) {
return c.env.Health(&rpctypes.Context{}) 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) 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) 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) return c.env.Validators(&rpctypes.Context{}, height, page, perPage)
} }


+ 1
- 1
types/proposal_test.go View File

@ -49,7 +49,7 @@ func TestProposalSignable(t *testing.T) {
func TestProposalString(t *testing.T) { func TestProposalString(t *testing.T) {
str := testProposal.String() 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 { if str != expected {
t.Errorf("got unexpected string for Proposal. Expected:\n%v\nGot:\n%v", expected, str) t.Errorf("got unexpected string for Proposal. Expected:\n%v\nGot:\n%v", expected, str)
} }


+ 2
- 2
types/vote_test.go View File

@ -220,13 +220,13 @@ func TestVoteVerify(t *testing.T) {
func TestVoteString(t *testing.T) { func TestVoteString(t *testing.T) {
str := examplePrecommit().String() 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 { if str != expected {
t.Errorf("got unexpected string for Vote. Expected:\n%v\nGot:\n%v", expected, str) t.Errorf("got unexpected string for Vote. Expected:\n%v\nGot:\n%v", expected, str)
} }
str2 := examplePrevote().String() 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 { if str2 != expected {
t.Errorf("got unexpected string for Vote. Expected:\n%v\nGot:\n%v", expected, str2) t.Errorf("got unexpected string for Vote. Expected:\n%v\nGot:\n%v", expected, str2)
} }


Loading…
Cancel
Save