From 2b18d9164000f809d8cf7779fa97e0dcd66d1a3f Mon Sep 17 00:00:00 2001 From: Spoorthi Satheesha <9302666+spoo-bar@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:39:52 +0000 Subject: [PATCH] more linting --- x/globalfee/ante/fee_setup_test.go | 4 ++-- x/tokenfactory/keeper/admins_test.go | 3 ++- x/tokenfactory/keeper/msg_server_test.go | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/x/globalfee/ante/fee_setup_test.go b/x/globalfee/ante/fee_setup_test.go index 56199c6a4..0cc69b12e 100644 --- a/x/globalfee/ante/fee_setup_test.go +++ b/x/globalfee/ante/fee_setup_test.go @@ -140,7 +140,7 @@ func (s *AnteHandlerTestSuite) SetupContractWithContractAuth(senderAddr string, } func (s *AnteHandlerTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { - var sigsV2 []signing.SignatureV2 + var sigsV2 []signing.SignatureV2 //nolint:golint,prealloc for i, priv := range privs { sigV2 := signing.SignatureV2{ PubKey: priv.PubKey(), @@ -202,7 +202,7 @@ func storeContract(ctx sdk.Context, msgServer wasmtypes.MsgServer, creator strin return res.CodeID, nil } -func getTestAccount() (privateKey secp256k1.PrivKey, publicKey crypto.PubKey, accountAddress sdk.AccAddress) { +func getTestAccount() (privateKey secp256k1.PrivKey, publicKey crypto.PubKey, accountAddress sdk.AccAddress) { //nolint:golint,unparam privateKey = secp256k1.GenPrivKey() publicKey = privateKey.PubKey() accountAddress = sdk.AccAddress(publicKey.Address()) diff --git a/x/tokenfactory/keeper/admins_test.go b/x/tokenfactory/keeper/admins_test.go index a674301de..2b7a61039 100644 --- a/x/tokenfactory/keeper/admins_test.go +++ b/x/tokenfactory/keeper/admins_test.go @@ -30,7 +30,7 @@ func (suite *KeeperTestSuite) TestAdminMsgs() { // Test burning from own account _, err = suite.msgServer.Burn(sdk.WrapSDKContext(suite.Ctx), types.NewMsgBurn(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 5))) - addr0bal -= 5 + addr0bal -= 5 //nolint:golint,ineffassign suite.Require().NoError(err) suite.Require().True(bankKeeper.GetBalance(suite.Ctx, suite.TestAccs[1], suite.defaultDenom).Amount.Int64() == addr1bal) @@ -381,6 +381,7 @@ func (suite *KeeperTestSuite) TestSetDenomMetaData() { }, } { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + tc := tc bankKeeper := suite.App.BankKeeper res, err := suite.msgServer.SetDenomMetadata(sdk.WrapSDKContext(suite.Ctx), &tc.msgSetDenomMetadata) if tc.expectedPass { diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index f5de534dc..1f6a80da2 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -250,6 +250,7 @@ func (suite *KeeperTestSuite) TestSetDenomMetaDataMsg() { }, } { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { + tc := tc ctx := suite.Ctx.WithEventManager(sdk.NewEventManager()) suite.Require().Equal(0, len(ctx.EventManager().Events())) // Test set denom metadata message