chore: bump golangci-lint and fix all linting issues (#21761)

This commit is contained in:
Julien Robert
2024-09-16 19:11:19 +00:00
committed by GitHub
parent 52ba264c80
commit cbdfd9bdfa
186 changed files with 114 additions and 455 deletions
-1
View File
@@ -90,7 +90,6 @@ func (s *decimalInternalTestSuite) TestDecMarshalJSON() {
{"12340Int", LegacyNewDec(12340), "\"12340.000000000000000000\"", false},
}
for _, tt := range tests {
tt := tt
s.T().Run(tt.name, func(t *testing.T) {
got, err := tt.d.MarshalJSON()
if (err != nil) != tt.wantErr {
+1 -2
View File
@@ -261,7 +261,7 @@ func (s *decimalTestSuite) TestArithmetic() {
}
for tcIndex, tc := range tests {
tc := tc
resAdd := tc.d1.Add(tc.d2)
resSub := tc.d1.Sub(tc.d2)
resMul := tc.d1.Mul(tc.d2)
@@ -727,7 +727,6 @@ func TestFormatDec(t *testing.T) {
require.NoError(t, err)
for _, tc := range testcases {
tc := tc
t.Run(tc[0], func(t *testing.T) {
out, err := math.FormatDec(tc[0])
require.NoError(t, err)
-1
View File
@@ -591,7 +591,6 @@ func TestFormatIntCorrectness(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.in, func(t *testing.T) {
got, err := math.FormatInt(tt.in)
if err != nil {
+1 -1
View File
@@ -244,7 +244,7 @@ func (s *uintTestSuite) TestSafeSub() {
}
for i, tc := range testCases {
tc := tc
if tc.panic {
s.Require().Panics(func() { tc.x.Sub(tc.y) })
continue