[sdk50] Lint the go relayer like IBC-go #1
Annotations
10 errors and 10 warnings
lint:
internal/relaydebug/debugserver.go#L50
Error return value of `srv.Serve` is not checked (errcheck)
|
lint:
cmd/chains_test.go#L77
Error return value of `enc.Encode` is not checked (errcheck)
|
lint:
relayer/chains/cosmos/grpc_query.go#L19
File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos/relayer) --custom-order (gci)
|
lint:
relayer/provider/matcher.go#L38
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
|
lint:
relayer/provider/matcher.go#L67
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
|
lint:
relayer/chains/cosmos/feegrant.go#L202
assignOp: replace `cc.PCfg.FeeGrants.GranteeLastSignerIndex = cc.PCfg.FeeGrants.GranteeLastSignerIndex + 1` with `cc.PCfg.FeeGrants.GranteeLastSignerIndex++` (gocritic)
|
lint:
relayer/chains/cosmos/log.go#L67
appendAssign: append result not assigned to the same slice (gocritic)
|
lint:
relayer/chains/penumbra/log.go#L59
appendAssign: append result not assigned to the same slice (gocritic)
|
lint:
relayer/chains/penumbra/msg.go#L51
typeSwitchVar: 2 cases can benefit from type switch with assignment (gocritic)
|
lint:
relayer/packet-tx.go#L118
elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
|
lint:
relayer/codecs/ethermint/encoding.go#L347
redefines-builtin-id: redefinition of the built-in type any (revive)
|
lint:
relayer/provider/provider.go#L32
exported: type name will be used as provider.ProviderConfig by other packages, and that stutters; consider calling this Config (revive)
|
lint:
relayer/processor/types.go#L247
receiver-naming: receiver name k should be consistent with previous receiver name connectionKey for ConnectionKey (revive)
|
lint:
relayer/chains/mock/mock_chain_processor.go#L22
exported: type name will be used as mock.MockChainProcessor by other packages, and that stutters; consider calling this ChainProcessor (revive)
|
lint:
relayer/chains/cosmos/query.go#L50
import-shadowing: The name 'query' shadows an import name (revive)
|
lint:
relayer/chains/cosmos/feegrant.go#L274
increment-decrement: should replace grantsNeeded += 1 with grantsNeeded++ (revive)
|
lint:
relayer/chains/cosmos/cosmos_chain_processor.go#L61
import-shadowing: The name 'provider' shadows an import name (revive)
|
lint:
relayer/chains/cosmos/tx.go#L355
import-shadowing: The name 'tx' shadows an import name (revive)
|
lint:
relayer/chains/cosmos/tx.go#L631
import-shadowing: The name 'tx' shadows an import name (revive)
|
lint:
relayer/chains/cosmos/tx.go#L164
context-as-argument: context.Context should be the first parameter of a function (revive)
|