chore: bump golangci-lint and fix all linting issues (#21761)
This commit is contained in:
@@ -172,7 +172,6 @@ func Test_runAddCmdLedgerDryRun(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range testData {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cmd := AddKeyCommand()
|
||||
cmd.Flags().AddFlagSet(Commands().PersistentFlags())
|
||||
|
||||
@@ -297,7 +297,6 @@ func Test_runAddCmdDryRun(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range testData {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cmd := AddKeyCommand()
|
||||
cmd.Flags().AddFlagSet(Commands().PersistentFlags())
|
||||
|
||||
@@ -67,7 +67,6 @@ func Test_runListCmd(t *testing.T) {
|
||||
{"keybase: w/key", kbHome2, false},
|
||||
}
|
||||
for _, tt := range testData {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cmd.SetArgs([]string{
|
||||
fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, tt.kbDir),
|
||||
|
||||
@@ -21,7 +21,6 @@ func TestParseKey(t *testing.T) {
|
||||
{"hex", []string{hexstr}, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
require.Equal(t, tt.wantErr, doParseKey(ParseKeyStringCommand(), "cosmos", tt.args) != nil)
|
||||
})
|
||||
|
||||
@@ -237,7 +237,6 @@ func Test_validateMultisigThreshold(t *testing.T) {
|
||||
{"1-2", args{2, 1}, true},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := validateMultisigThreshold(tt.args.k, tt.args.nKeys); (err != nil) != tt.wantErr {
|
||||
t.Errorf("validateMultisigThreshold() error = %v, wantErr %v", err, tt.wantErr)
|
||||
@@ -272,7 +271,6 @@ func Test_getBechKeyOut(t *testing.T) {
|
||||
{"cons", args{sdk.PrefixConsensus}, MkConsKeyOutput, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
output, err := getKeyOutput(ctx, tt.args.bechPrefix, k)
|
||||
if tt.wantErr {
|
||||
|
||||
Reference in New Issue
Block a user