chore: bump golangci-lint and fix all linting issues (#21761)
This commit is contained in:
@@ -149,7 +149,6 @@ func (s *CLITestSuite) TestPrepareConfigForTxCreateValidator() {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
s.Run(tc.name, func() {
|
||||
fs, _ := cli.CreateValidatorMsgFlagSet(ip)
|
||||
fs.String(flags.FlagName, "", "name of private key with which to sign the gentx")
|
||||
@@ -296,7 +295,6 @@ func (s *CLITestSuite) TestNewCreateValidatorCmd() {
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.Run(tc.name, func() {
|
||||
out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args)
|
||||
if tc.expectErrMsg != "" {
|
||||
@@ -419,8 +417,6 @@ func (s *CLITestSuite) TestNewEditValidatorCmd() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
s.Run(tc.name, func() {
|
||||
out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args)
|
||||
if tc.expectErrMsg != "" {
|
||||
|
||||
@@ -44,8 +44,6 @@ func TestValidateGenesis(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
genesisState := types.DefaultGenesisState()
|
||||
tt.mutate(genesisState)
|
||||
|
||||
@@ -411,7 +411,7 @@ func (k Querier) DelegatorUnbondingDelegations(ctx context.Context, req *types.Q
|
||||
}
|
||||
|
||||
// HistoricalInfo queries the historical info for given height
|
||||
func (k Querier) HistoricalInfo(ctx context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error) { // nolint:staticcheck // SA1019: deprecated endpoint
|
||||
func (k Querier) HistoricalInfo(ctx context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error) { //nolint:staticcheck // SA1019: deprecated endpoint
|
||||
if req == nil {
|
||||
return nil, status.Error(codes.InvalidArgument, "empty request")
|
||||
}
|
||||
|
||||
@@ -314,7 +314,6 @@ func (s *KeeperTestSuite) TestMsgCreateValidator() {
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
if tc.expPanic {
|
||||
require.PanicsWithValue(tc.expPanicMsg, func() {
|
||||
@@ -496,7 +495,6 @@ func (s *KeeperTestSuite) TestMsgEditValidator() {
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
_, err := msgServer.EditValidator(tc.ctx, tc.input)
|
||||
if tc.expErr {
|
||||
@@ -614,7 +612,6 @@ func (s *KeeperTestSuite) TestMsgDelegate() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
_, err := msgServer.Delegate(ctx, tc.input)
|
||||
if tc.expErr {
|
||||
@@ -782,7 +779,6 @@ func (s *KeeperTestSuite) TestMsgBeginRedelegate() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
_, err := msgServer.BeginRedelegate(ctx, tc.input)
|
||||
if tc.expErr {
|
||||
@@ -906,7 +902,6 @@ func (s *KeeperTestSuite) TestMsgUndelegate() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
_, err := msgServer.Undelegate(ctx, tc.input)
|
||||
if tc.expErr {
|
||||
@@ -1068,7 +1063,6 @@ func (s *KeeperTestSuite) TestMsgCancelUnbondingDelegation() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
_, err := msgServer.CancelUnbondingDelegation(ctx, tc.input)
|
||||
if tc.expErr {
|
||||
@@ -1233,7 +1227,6 @@ func (s *KeeperTestSuite) TestMsgUpdateParams() {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
s.T().Run(tc.name, func(t *testing.T) {
|
||||
_, err := msgServer.UpdateParams(ctx, tc.input)
|
||||
if tc.expErrMsg != "" {
|
||||
|
||||
@@ -46,7 +46,6 @@ func TestDecodeStore(t *testing.T) {
|
||||
{"other", ""},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
i, tt := i, tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
switch i {
|
||||
case len(tests) - 1:
|
||||
|
||||
@@ -109,8 +109,6 @@ func TestRandomizedGenState1(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
|
||||
require.Panicsf(t, func() { simulation.RandomizedGenState(&tt.simState) }, tt.panicMsg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,7 +408,6 @@ func TestAuthzAuthorizations(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(tc.msg, func(t *testing.T) {
|
||||
delAuth, err := stakingtypes.NewStakeAuthorization(tc.allowed, tc.denied, tc.msgType, tc.limit, valAddressCodec)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user