Skip to content

Commit 39bfd5a

Browse files
committed
lint
1 parent e608651 commit 39bfd5a

File tree

111 files changed

+197
-331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+197
-331
lines changed

baseapp/abci_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,6 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) {
13361336
}
13371337

13381338
for name, tc := range testCases {
1339-
tc := tc
13401339

13411340
tc.bapp.SetParamStore(&paramStore{db: dbm.NewMemDB()})
13421341
_, err = tc.bapp.InitChain(&abci.RequestInitChain{

baseapp/snapshot_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ func TestABCI_OfferSnapshot_Errors(t *testing.T) {
245245
}, abci.ResponseOfferSnapshot_REJECT},
246246
}
247247
for name, tc := range testCases {
248-
tc := tc
249248
t.Run(name, func(t *testing.T) {
250249
resp, err := suite.baseApp.OfferSnapshot(&abci.RequestOfferSnapshot{Snapshot: tc.snapshot})
251250
require.NoError(t, err)

client/cmd_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ func TestSetCmdClientContextHandler(t *testing.T) {
125125
}
126126

127127
for _, tc := range testCases {
128-
tc := tc
129-
130128
t.Run(tc.name, func(t *testing.T) {
131129
cmd := newCmd()
132130
_ = testutil.ApplyMockIODiscardOutErr(cmd)

client/config/config_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ func TestConfigCmdEnvFlag(t *testing.T) {
5858
}
5959

6060
for _, tc := range tt {
61-
tc := tc
6261
t.Run(tc.name, func(t *testing.T) {
6362
testCmd := &cobra.Command{
6463
Use: "test",

client/flags/flags_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ func TestParseGasSetting(t *testing.T) {
2222
}
2323

2424
for _, tc := range testCases {
25-
tc := tc
26-
2725
t.Run(tc.name, func(t *testing.T) {
2826
gs, err := flags.ParseGasSetting(tc.input)
2927

client/tx/aux_builder_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ func TestAuxTxBuilder(t *testing.T) {
213213
}
214214

215215
for _, tc := range testcases {
216-
tc := tc
217216
t.Run(tc.name, func(t *testing.T) {
218217
b = tx.NewAuxTxBuilder()
219218
err := tc.malleate()

client/tx/tx_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func TestCalculateGas(t *testing.T) {
7474
}
7575

7676
for _, tc := range testCases {
77-
stc := tc
7877
txCfg, _ := newTestTxConfig()
7978
defaultSignMode, err := signing.APISignModeToInternal(txCfg.SignModeHandler().DefaultMode())
8079
require.NoError(t, err)
@@ -83,16 +82,16 @@ func TestCalculateGas(t *testing.T) {
8382
WithChainID("test-chain").
8483
WithTxConfig(txCfg).WithSignMode(defaultSignMode)
8584

86-
t.Run(stc.name, func(t *testing.T) {
85+
t.Run(tc.name, func(t *testing.T) {
8786
mockClientCtx := mockContext{
8887
gasUsed: tc.args.mockGasUsed,
8988
wantErr: tc.args.mockWantErr,
9089
}
91-
simRes, gotAdjusted, err := CalculateGas(mockClientCtx, txf.WithGasAdjustment(stc.args.adjustment))
92-
if stc.expPass {
90+
simRes, gotAdjusted, err := CalculateGas(mockClientCtx, txf.WithGasAdjustment(tc.args.adjustment))
91+
if tc.expPass {
9392
require.NoError(t, err)
94-
require.Equal(t, simRes.GasInfo.GasUsed, stc.wantEstimate)
95-
require.Equal(t, gotAdjusted, stc.wantAdjusted)
93+
require.Equal(t, simRes.GasInfo.GasUsed, tc.wantEstimate)
94+
require.Equal(t, gotAdjusted, tc.wantAdjusted)
9695
require.NotNil(t, simRes.Result)
9796
} else {
9897
require.Error(t, err)

codec/amino_codec_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ func TestAminoCodecMarshalJSONIndent(t *testing.T) {
7171
}
7272

7373
for _, tc := range testCases {
74-
tc := tc
75-
7674
t.Run(tc.name, func(t *testing.T) {
7775
cdc := codec.NewAminoCodec(createTestCodec())
7876
bz, err := cdc.MarshalJSONIndent(tc.input, "", " ")

codec/codec_common_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ func testMarshaling(t *testing.T, cdc interface {
121121
}
122122

123123
for _, tc := range testCases {
124-
tc := tc
125124
m1 := mustMarshaler{cdc.Marshal, cdc.MustMarshal, cdc.Unmarshal, cdc.MustUnmarshal}
126125
m2 := mustMarshaler{cdc.MarshalLengthPrefixed, cdc.MustMarshalLengthPrefixed, cdc.UnmarshalLengthPrefixed, cdc.MustUnmarshalLengthPrefixed}
127126
m3 := mustMarshaler{

crypto/keyring/keyring_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,6 @@ func TestRenameKey(t *testing.T) {
20022002
}
20032003

20042004
for _, tc := range testCases {
2005-
tc := tc
20062005
kr := newKeyring(t, "testKeyring")
20072006
t.Run(tc.name, func(t *testing.T) {
20082007
tc.run(kr)

0 commit comments

Comments
 (0)