diff --git a/.golangci.yml b/.golangci.yml index 3aea828800..34738ccf7e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -35,7 +35,7 @@ linters: - unparam - misspell # - wsl - # - nolintlint + - nolintlint issues: exclude-rules: diff --git a/client/flags/flags.go b/client/flags/flags.go index c45a0ac145..f4c106be31 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -13,7 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" ) -// nolint const ( // DefaultGasAdjustment is applied to gas estimates to avoid tx execution // failures due to state changes that might occur between the tx simulation diff --git a/client/tx/factory.go b/client/tx/factory.go index 25cff13d67..e83590091e 100644 --- a/client/tx/factory.go +++ b/client/tx/factory.go @@ -63,7 +63,6 @@ func NewFactoryFromCLI(input io.Reader) Factory { return f } -// nolint func (f Factory) AccountNumber() uint64 { return f.accountNumber } func (f Factory) Sequence() uint64 { return f.sequence } func (f Factory) Gas() uint64 { return f.gas } diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 26ec847ab1..9458e672fe 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -424,7 +424,7 @@ func (ks keystore) List() ([]Info, error) { var res []Info keys, err := ks.db.Keys() - if err != nil { //nolint:unparam + if err != nil { return nil, err } @@ -527,7 +527,7 @@ func SignWithLedger(info Info, msg []byte) (sig []byte, pub tmcrypto.PubKey, err return nil, nil, errors.New("not a ledger object") } - path, err := info.GetPath() //nolint:unparam + path, err := info.GetPath() if err != nil { return } @@ -629,7 +629,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { buf := bufio.NewReader(buf) pass, err := input.GetPassword("Enter keyring passphrase:", buf) - if err != nil { //nolint:unparam + if err != nil { fmt.Fprintln(os.Stderr, err) continue } @@ -656,7 +656,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { saltBytes := tmcrypto.CRandBytes(16) passwordHash, err := bcrypt.GenerateFromPassword(saltBytes, []byte(pass), 2) - if err != nil { //nolint:unparam + if err != nil { fmt.Fprintln(os.Stderr, err) continue } diff --git a/std/msgs.go b/std/msgs.go index 259dad1560..5d34ceed03 100644 --- a/std/msgs.go +++ b/std/msgs.go @@ -42,7 +42,6 @@ func (msg MsgSubmitProposal) ValidateBasic() error { return nil } -// nolint func (msg *MsgSubmitProposal) GetContent() gov.Content { return msg.Content.GetContent() } func (msg *MsgSubmitProposal) SetContent(content gov.Content) error { stdContent := &Content{} diff --git a/store/mem/store.go b/store/mem/store.go index 3a1cdd617a..156b17061c 100644 --- a/store/mem/store.go +++ b/store/mem/store.go @@ -48,6 +48,5 @@ func (s Store) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.Cach // Commit performs a no-op as entries are persistent between commitments. func (s *Store) Commit() (id types.CommitID) { return } -// nolint func (s *Store) SetPruning(pruning types.PruningOptions) {} func (s Store) LastCommitID() (id types.CommitID) { return } diff --git a/store/reexport.go b/store/reexport.go index 9e4dba0ed5..2a84698524 100644 --- a/store/reexport.go +++ b/store/reexport.go @@ -5,7 +5,6 @@ import ( ) // Import cosmos-sdk/types/store.go for convenience. -// nolint type ( PruningOptions = types.PruningOptions Store = types.Store @@ -22,8 +21,8 @@ type ( CacheWrapper = types.CacheWrapper CacheWrap = types.CacheWrap CommitID = types.CommitID - StoreKey = types.StoreKey - StoreType = types.StoreType + Key = types.StoreKey + Type = types.StoreType Queryable = types.Queryable TraceContext = types.TraceContext Gas = types.Gas @@ -31,7 +30,6 @@ type ( GasConfig = types.GasConfig ) -// nolint - reexport var ( PruneNothing = types.PruneNothing PruneEverything = types.PruneEverything diff --git a/store/types/store.go b/store/types/store.go index cb0d3dd5c2..6b4d9f6d31 100644 --- a/store/types/store.go +++ b/store/types/store.go @@ -9,7 +9,7 @@ import ( dbm "github.com/tendermint/tm-db" ) -type Store interface { //nolint +type Store interface { GetStoreType() StoreType CacheWrapper } @@ -87,7 +87,7 @@ func (s *StoreUpgrades) RenamedFrom(key string) string { } -type MultiStore interface { //nolint +type MultiStore interface { Store // Cache wrap MultiStore. @@ -236,7 +236,7 @@ type CacheWrap interface { CacheWrapWithTrace(w io.Writer, tc TraceContext) CacheWrap } -type CacheWrapper interface { //nolint +type CacheWrapper interface { // CacheWrap cache wraps. CacheWrap() CacheWrap @@ -253,7 +253,7 @@ type CommitID struct { Hash []byte } -func (cid CommitID) IsZero() bool { //nolint +func (cid CommitID) IsZero() bool { return cid.Version == 0 && len(cid.Hash) == 0 } @@ -268,7 +268,6 @@ func (cid CommitID) String() string { type StoreType int const ( - //nolint StoreTypeMulti StoreType = iota StoreTypeDB StoreTypeIAVL diff --git a/types/coin.go b/types/coin.go index 8f51f64087..96b9c71b2d 100644 --- a/types/coin.go +++ b/types/coin.go @@ -563,7 +563,6 @@ func removeZeroCoins(coins Coins) Coins { //----------------------------------------------------------------------------- // Sort interface -//nolint func (coins Coins) Len() int { return len(coins) } func (coins Coins) Less(i, j int) bool { return coins[i].Denom < coins[j].Denom } func (coins Coins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] } diff --git a/types/dec_coin.go b/types/dec_coin.go index 87bf3d8a72..4b3396ca87 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -575,7 +575,6 @@ func removeZeroDecCoins(coins DecCoins) DecCoins { var _ sort.Interface = Coins{} -//nolint func (coins DecCoins) Len() int { return len(coins) } func (coins DecCoins) Less(i, j int) bool { return coins[i].Denom < coins[j].Denom } func (coins DecCoins) Swap(i, j int) { coins[i], coins[j] = coins[j], coins[i] } diff --git a/types/proto.go b/types/proto.go index b6978c1eb9..5f2df428d2 100644 --- a/types/proto.go +++ b/types/proto.go @@ -1,10 +1,5 @@ package types -import ( - _ "github.com/gogo/protobuf/gogoproto" // nolint - _ "github.com/regen-network/cosmos-proto" // nolint -) - // CustomProtobufType defines the interface custom gogo proto types must implement // in order to be used as a "customtype" extension. // diff --git a/types/store.go b/types/store.go index dd8bb17365..96494d98e9 100644 --- a/types/store.go +++ b/types/store.go @@ -6,12 +6,10 @@ import ( "github.com/cosmos/cosmos-sdk/store/types" ) -// nolint - reexport type ( PruningOptions = types.PruningOptions ) -// nolint - reexport type ( Store = types.Store Committer = types.Committer @@ -57,7 +55,6 @@ func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvAs, kvBs []t return types.DiffKVStores(a, b, prefixesToSkip) } -// nolint - reexport type ( CacheKVStore = types.CacheKVStore CommitKVStore = types.CommitKVStore @@ -66,10 +63,8 @@ type ( CommitID = types.CommitID ) -// nolint - reexport type StoreType = types.StoreType -// nolint - reexport const ( StoreTypeMulti = types.StoreTypeMulti StoreTypeDB = types.StoreTypeDB @@ -78,7 +73,6 @@ const ( StoreTypeMemory = types.StoreTypeMemory ) -// nolint - reexport type ( StoreKey = types.StoreKey CapabilityKey = types.CapabilityKey @@ -158,25 +152,21 @@ type TraceContext = types.TraceContext // -------------------------------------- -// nolint - reexport type ( Gas = types.Gas GasMeter = types.GasMeter GasConfig = types.GasConfig ) -// nolint - reexport func NewGasMeter(limit Gas) GasMeter { return types.NewGasMeter(limit) } -// nolint - reexport type ( ErrorOutOfGas = types.ErrorOutOfGas ErrorGasOverflow = types.ErrorGasOverflow ) -// nolint - reexport func NewInfiniteGasMeter() GasMeter { return types.NewInfiniteGasMeter() } diff --git a/types/tx_msg.go b/types/tx_msg.go index b81eb26f58..9123cd9be9 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -77,7 +77,6 @@ func NewTestMsg(addrs ...AccAddress) *TestMsg { } } -//nolint func (msg *TestMsg) Route() string { return "TestMsg" } func (msg *TestMsg) Type() string { return "Test message" } func (msg *TestMsg) GetSignBytes() []byte { diff --git a/x/auth/types/test_utils.go b/x/auth/types/test_utils.go index a5024e7f8b..4c0d801af3 100644 --- a/x/auth/types/test_utils.go +++ b/x/auth/types/test_utils.go @@ -1,4 +1,3 @@ -// nolint noalias package types import ( diff --git a/x/auth/vesting/types/test_common.go b/x/auth/vesting/types/test_common.go index ce73d6defd..0287bde80d 100644 --- a/x/auth/vesting/types/test_common.go +++ b/x/auth/vesting/types/test_common.go @@ -1,4 +1,3 @@ -// nolint noalias package types import ( diff --git a/x/bank/alias.go b/x/bank/alias.go index aba6838199..3147542946 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -1,7 +1,5 @@ package bank -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/x/bank/client/rest/query.go b/x/bank/client/rest/query.go index f707cc3cdc..ec6b39ad88 100644 --- a/x/bank/client/rest/query.go +++ b/x/bank/client/rest/query.go @@ -107,7 +107,7 @@ func supplyOfHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { denom := mux.Vars(r)["denom"] cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { //nolint:unparam + if !ok { return } diff --git a/x/capability/alias.go b/x/capability/alias.go index da91311953..d033be5033 100644 --- a/x/capability/alias.go +++ b/x/capability/alias.go @@ -7,14 +7,12 @@ import ( // DONTCOVER -// nolint const ( ModuleName = types.ModuleName StoreKey = types.StoreKey MemStoreKey = types.MemStoreKey ) -// nolint var ( NewKeeper = keeper.NewKeeper NewCapability = types.NewCapability @@ -30,12 +28,11 @@ var ( NewCapabilityOwners = types.NewCapabilityOwners ) -// nolint type ( - Keeper = keeper.Keeper - ScopedKeeper = keeper.ScopedKeeper - Capability = types.Capability - CapabilityOwners = types.CapabilityOwners - GenesisState = types.GenesisState - GenesisOwners = types.GenesisOwners + Keeper = keeper.Keeper + ScopedKeeper = keeper.ScopedKeeper + Capability = types.Capability + Owners = types.CapabilityOwners + GenesisState = types.GenesisState + GenesisOwners = types.GenesisOwners ) diff --git a/x/crisis/alias.go b/x/crisis/alias.go index 8e831527db..7a93ff6599 100644 --- a/x/crisis/alias.go +++ b/x/crisis/alias.go @@ -1,7 +1,5 @@ package crisis -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/crisis/keeper" "github.com/cosmos/cosmos-sdk/x/crisis/types" diff --git a/x/crisis/types/msgs.go b/x/crisis/types/msgs.go index 49698c1ca9..349977fc8f 100644 --- a/x/crisis/types/msgs.go +++ b/x/crisis/types/msgs.go @@ -18,7 +18,6 @@ func NewMsgVerifyInvariant(sender sdk.AccAddress, invariantModuleName, } } -//nolint func (msg MsgVerifyInvariant) Route() string { return ModuleName } func (msg MsgVerifyInvariant) Type() string { return "verify_invariant" } diff --git a/x/distribution/alias.go b/x/distribution/alias.go index 838bcc6339..0514e82218 100644 --- a/x/distribution/alias.go +++ b/x/distribution/alias.go @@ -6,8 +6,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/distribution/types" ) -// nolint - const ( ModuleName = types.ModuleName StoreKey = types.StoreKey diff --git a/x/evidence/alias.go b/x/evidence/alias.go index ba6e626ea3..3505652cae 100644 --- a/x/evidence/alias.go +++ b/x/evidence/alias.go @@ -5,8 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/evidence/types" ) -// nolint - const ( ModuleName = types.ModuleName StoreKey = types.StoreKey diff --git a/x/genutil/alias.go b/x/genutil/alias.go index 92cd6f78b0..8639a7368a 100644 --- a/x/genutil/alias.go +++ b/x/genutil/alias.go @@ -1,8 +1,8 @@ -// nolint +package genutil + // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/genutil/types -package genutil import ( "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index 5a3d4a3409..6b5a799043 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -207,7 +207,7 @@ func readUnsignedGenTxFile(cdc *codec.Codec, r io.Reader) (auth.StdTx, error) { var stdTx auth.StdTx bytes, err := ioutil.ReadAll(r) - if err != nil { // nolint:unparam + if err != nil { return stdTx, err } @@ -224,7 +224,7 @@ func writeSignedGenTx(cdc *codec.Codec, outputDocument string, tx auth.StdTx) er defer outputFile.Close() json, err := cdc.MarshalJSON(tx) - if err != nil { //nolint:unparam + if err != nil { return err } diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index 01ed270356..6797405ba9 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -59,7 +59,7 @@ func displayInfo(cdc codec.JSONMarshaler, info printInfo) error { // InitCmd returns a command that initializes all files needed for Tendermint // and the respective application. -func InitCmd(ctx *server.Context, cdc codec.JSONMarshaler, mbm module.BasicManager, defaultNodeHome string) *cobra.Command { // nolint: golint +func InitCmd(ctx *server.Context, cdc codec.JSONMarshaler, mbm module.BasicManager, defaultNodeHome string) *cobra.Command { cmd := &cobra.Command{ Use: "init [moniker]", Short: "Initialize private validator, p2p, genesis, and application configuration files", diff --git a/x/genutil/collect.go b/x/genutil/collect.go index 8af414eef9..f02ae9b323 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -74,7 +74,7 @@ func CollectStdTxs(cdc *codec.Codec, moniker, genTxsDir string, var fos []os.FileInfo fos, err = ioutil.ReadDir(genTxsDir) - if err != nil { //nolint:unparam + if err != nil { return appGenTxs, persistentPeers, err } diff --git a/x/gov/alias.go b/x/gov/alias.go index b682fcd169..02160c78a1 100644 --- a/x/gov/alias.go +++ b/x/gov/alias.go @@ -1,7 +1,5 @@ package gov -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/cosmos/cosmos-sdk/x/gov/types" diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index d83f6e48b5..57b3a16efc 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -12,7 +12,7 @@ import ( func (keeper Keeper) GetDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) (deposit types.Deposit, found bool) { store := ctx.KVStore(keeper.storeKey) bz := store.Get(types.DepositKey(proposalID, depositorAddr)) - if bz == nil { //nolint:unparam + if bz == nil { return deposit, false } diff --git a/x/gov/types/msgs.go b/x/gov/types/msgs.go index 29e3ab9329..5c76700045 100644 --- a/x/gov/types/msgs.go +++ b/x/gov/types/msgs.go @@ -225,7 +225,6 @@ func (msg MsgSubmitProposal) GetSignBytes() []byte { return sdk.MustSortJSON(bz) } -// nolint func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{msg.Proposer} } func (msg MsgSubmitProposal) Route() string { return RouterKey } func (msg MsgSubmitProposal) Type() string { return TypeMsgSubmitProposal } diff --git a/x/ibc/02-client/alias.go b/x/ibc/02-client/alias.go index a274af3cc8..bf959628ef 100644 --- a/x/ibc/02-client/alias.go +++ b/x/ibc/02-client/alias.go @@ -1,6 +1,5 @@ package client -// nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/02-client/keeper @@ -48,10 +47,9 @@ var ( AttributeValueCategory = types.AttributeValueCategory ) -// nolint type ( - Keeper = keeper.Keeper - StakingKeeper = types.StakingKeeper - GenesisState = types.GenesisState - ClientConsensusStates = types.ClientConsensusStates + Keeper = keeper.Keeper + StakingKeeper = types.StakingKeeper + GenesisState = types.GenesisState + ConsensusStates = types.ClientConsensusStates ) diff --git a/x/ibc/03-connection/alias.go b/x/ibc/03-connection/alias.go index 1b48da7544..d2ee564875 100644 --- a/x/ibc/03-connection/alias.go +++ b/x/ibc/03-connection/alias.go @@ -1,6 +1,5 @@ package connection -// nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper @@ -62,19 +61,18 @@ var ( AttributeValueCategory = types.AttributeValueCategory ) -// nolint: golint type ( Keeper = keeper.Keeper - ConnectionEnd = types.ConnectionEnd + End = types.ConnectionEnd Counterparty = types.Counterparty ClientKeeper = types.ClientKeeper MsgConnectionOpenInit = types.MsgConnectionOpenInit MsgConnectionOpenTry = types.MsgConnectionOpenTry MsgConnectionOpenAck = types.MsgConnectionOpenAck MsgConnectionOpenConfirm = types.MsgConnectionOpenConfirm - ConnectionResponse = types.ConnectionResponse + Response = types.ConnectionResponse ClientConnectionsResponse = types.ClientConnectionsResponse QueryClientConnectionsParams = types.QueryClientConnectionsParams GenesisState = types.GenesisState - ConnectionPaths = types.ConnectionPaths + Paths = types.ConnectionPaths ) diff --git a/x/ibc/04-channel/alias.go b/x/ibc/04-channel/alias.go index c4284b5127..0e3356bec4 100644 --- a/x/ibc/04-channel/alias.go +++ b/x/ibc/04-channel/alias.go @@ -1,6 +1,5 @@ package channel -// nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/04-channel/keeper diff --git a/x/ibc/05-port/alias.go b/x/ibc/05-port/alias.go index 5aa03309b5..19800bbddb 100644 --- a/x/ibc/05-port/alias.go +++ b/x/ibc/05-port/alias.go @@ -1,6 +1,5 @@ package port -// nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/05-port/keeper diff --git a/x/ibc/07-tendermint/types/client_state_test.go b/x/ibc/07-tendermint/types/client_state_test.go index e2a4c71b12..5e152bbc88 100644 --- a/x/ibc/07-tendermint/types/client_state_test.go +++ b/x/ibc/07-tendermint/types/client_state_test.go @@ -146,7 +146,7 @@ func (suite *TendermintTestSuite) TestVerifyConnectionState() { testCases := []struct { name string clientState ibctmtypes.ClientState - connection connection.ConnectionEnd + connection connection.End consensusState ibctmtypes.ConsensusState prefix commitmenttypes.MerklePrefix proof commitmenttypes.MerkleProof diff --git a/x/ibc/09-localhost/types/client_state_test.go b/x/ibc/09-localhost/types/client_state_test.go index df9ea88f42..daa433363d 100644 --- a/x/ibc/09-localhost/types/client_state_test.go +++ b/x/ibc/09-localhost/types/client_state_test.go @@ -100,7 +100,7 @@ func (suite *LocalhostTestSuite) TestVerifyConnectionState() { testCases := []struct { name string clientState types.ClientState - connection connection.ConnectionEnd + connection connection.End prefix commitmenttypes.MerklePrefix proof commitmenttypes.MerkleProof expPass bool diff --git a/x/ibc/20-transfer/alias.go b/x/ibc/20-transfer/alias.go index f8569d02e0..b6b8c8d438 100644 --- a/x/ibc/20-transfer/alias.go +++ b/x/ibc/20-transfer/alias.go @@ -1,6 +1,5 @@ package transfer -// nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/20-transfer/keeper diff --git a/x/ibc/20-transfer/types/expected_keepers.go b/x/ibc/20-transfer/types/expected_keepers.go index a9d96eee81..5c5e26da1a 100644 --- a/x/ibc/20-transfer/types/expected_keepers.go +++ b/x/ibc/20-transfer/types/expected_keepers.go @@ -41,7 +41,7 @@ type ClientKeeper interface { // ConnectionKeeper defines the expected IBC connection keeper type ConnectionKeeper interface { - GetConnection(ctx sdk.Context, connectionID string) (connection connection.ConnectionEnd, found bool) + GetConnection(ctx sdk.Context, connectionID string) (connection connection.End, found bool) } // PortKeeper defines the expected IBC port keeper diff --git a/x/ibc/alias.go b/x/ibc/alias.go index 7c1ad02349..29e616cc7c 100644 --- a/x/ibc/alias.go +++ b/x/ibc/alias.go @@ -1,6 +1,5 @@ package ibc -// nolint // autogenerated code using github.com/rigelrozanski/multitool // aliases generated for the following subdirectories: // ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/keeper diff --git a/x/ibc/genesis_test.go b/x/ibc/genesis_test.go index 1065a485ee..1d9ada5b32 100644 --- a/x/ibc/genesis_test.go +++ b/x/ibc/genesis_test.go @@ -31,7 +31,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ibctmtypes.NewClientState(clientID, trustingPeriod, ubdPeriod, maxClockDrift, suite.header), localhosttypes.NewClientState(suite.store, "chaindID", 10), }, - []client.ClientConsensusStates{ + []client.ConsensusStates{ client.NewClientConsensusStates( clientID, []exported.ConsensusState{ @@ -43,10 +43,10 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, ), ConnectionGenesis: connection.NewGenesisState( - []connection.ConnectionEnd{ + []connection.End{ connection.NewConnectionEnd(ibctypes.INIT, connectionID, clientID, connection.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"}), }, - []connection.ConnectionPaths{ + []connection.Paths{ connection.NewConnectionPaths(clientID, []string{ibctypes.ConnectionPath(connectionID)}), }, ), @@ -94,10 +94,10 @@ func (suite *IBCTestSuite) TestValidateGenesis() { genState: ibc.GenesisState{ ClientGenesis: client.DefaultGenesisState(), ConnectionGenesis: connection.NewGenesisState( - []connection.ConnectionEnd{ + []connection.End{ connection.NewConnectionEnd(ibctypes.INIT, connectionID, "CLIENTIDONE", connection.NewCounterparty(clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"}), }, - []connection.ConnectionPaths{ + []connection.Paths{ connection.NewConnectionPaths(clientID, []string{ibctypes.ConnectionPath(connectionID)}), }, ), diff --git a/x/mint/alias.go b/x/mint/alias.go index 0fca6895ab..da334b418a 100644 --- a/x/mint/alias.go +++ b/x/mint/alias.go @@ -1,7 +1,5 @@ package mint -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/mint/keeper" "github.com/cosmos/cosmos-sdk/x/mint/types" diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index 001888cafe..5e37b8704f 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -58,7 +58,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter) { store := ctx.KVStore(k.storeKey) b := store.Get(types.MinterKey) - if b == nil { //nolint:unparam + if b == nil { panic("stored minter should not have been nil") } diff --git a/x/mint/types/keys.go b/x/mint/types/keys.go index 2e0cbdef85..29b21ce4e8 100644 --- a/x/mint/types/keys.go +++ b/x/mint/types/keys.go @@ -3,7 +3,6 @@ package types // MinterKey is the key to use for the keeper store. var MinterKey = []byte{0x00} -// nolint const ( // module name ModuleName = "mint" diff --git a/x/params/alias.go b/x/params/alias.go index 9649567b3e..f7877f0929 100644 --- a/x/params/alias.go +++ b/x/params/alias.go @@ -1,7 +1,5 @@ package params -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/params/keeper" "github.com/cosmos/cosmos-sdk/x/params/types" diff --git a/x/slashing/alias.go b/x/slashing/alias.go index 9ebdd29edf..55cc2c5bc7 100644 --- a/x/slashing/alias.go +++ b/x/slashing/alias.go @@ -1,7 +1,5 @@ package slashing -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/slashing/keeper" "github.com/cosmos/cosmos-sdk/x/slashing/types" diff --git a/x/slashing/client/cli/flags.go b/x/slashing/client/cli/flags.go index 09db8e8258..4f38451218 100644 --- a/x/slashing/client/cli/flags.go +++ b/x/slashing/client/cli/flags.go @@ -1,6 +1,5 @@ package cli -// nolint const ( FlagAddressValidator = "validator" ) diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index 3991952624..ac1be5fae1 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -1,4 +1,3 @@ -// nolint package keeper import ( diff --git a/x/slashing/types/msg.go b/x/slashing/types/msg.go index a9798615f6..000f695ca2 100644 --- a/x/slashing/types/msg.go +++ b/x/slashing/types/msg.go @@ -14,7 +14,6 @@ func NewMsgUnjail(validatorAddr sdk.ValAddress) MsgUnjail { } } -//nolint func (msg MsgUnjail) Route() string { return RouterKey } func (msg MsgUnjail) Type() string { return "unjail" } func (msg MsgUnjail) GetSigners() []sdk.AccAddress { diff --git a/x/upgrade/alias.go b/x/upgrade/alias.go index 784eb681b1..6e4fb09e5f 100644 --- a/x/upgrade/alias.go +++ b/x/upgrade/alias.go @@ -1,7 +1,5 @@ package upgrade -// nolint - import ( "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" "github.com/cosmos/cosmos-sdk/x/upgrade/types" diff --git a/x/upgrade/types/proposal.go b/x/upgrade/types/proposal.go index bc7acc7b7a..d4ae8422ea 100644 --- a/x/upgrade/types/proposal.go +++ b/x/upgrade/types/proposal.go @@ -25,7 +25,6 @@ func init() { gov.RegisterProposalTypeCodec(&CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal") } -// nolint func (sup *SoftwareUpgradeProposal) GetTitle() string { return sup.Title } func (sup *SoftwareUpgradeProposal) GetDescription() string { return sup.Description } func (sup *SoftwareUpgradeProposal) ProposalRoute() string { return RouterKey } @@ -51,7 +50,6 @@ func NewCancelSoftwareUpgradeProposal(title, description string) gov.Content { // Implements Proposal Interface var _ gov.Content = &CancelSoftwareUpgradeProposal{} -// nolint func (sup *CancelSoftwareUpgradeProposal) GetTitle() string { return sup.Title } func (sup *CancelSoftwareUpgradeProposal) GetDescription() string { return sup.Description } func (sup *CancelSoftwareUpgradeProposal) ProposalRoute() string { return RouterKey }