Skip to content

Commit 14d3137

Browse files
authored
chore: bump golangci-lint and fix config (#1680)
* chore: bump golangci-lint and fix config This fixes the CI lint step. No change in code except a fix in test output. * bump golangci-lint from 1.56.2 to 1.63.4 * test: fix test check
1 parent e686f55 commit 14d3137

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
GO_VERSION: stable
11-
GOLANGCI_LINT_VERSION: v1.56.2
11+
GOLANGCI_LINT_VERSION: v1.63.4
1212

1313
jobs:
1414

.golangci.yml

+11-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44

55
linters-settings:
66
govet:
7-
check-shadowing: false
7+
shadow: false
88
gocyclo:
99
min-complexity: 12
1010
maligned:
@@ -92,22 +92,8 @@ linters-settings:
9292
linters:
9393
enable-all: true
9494
disable:
95-
- deadcode # deprecated
96-
- exhaustivestruct # deprecated
97-
- golint # deprecated
98-
- ifshort # deprecated
99-
- interfacer # deprecated
100-
- maligned # deprecated
101-
- nosnakecase # deprecated
102-
- scopelint # deprecated
103-
- structcheck # deprecated
104-
- varcheck # deprecated
105-
- cyclop # duplicate of gocyclo
106-
- sqlclosecheck # not relevant (SQL)
107-
- rowserrcheck # not relevant (SQL)
108-
- execinquery # not relevant (SQL)
10995
- lll
110-
- gas
96+
- gosec
11197
- dupl
11298
- prealloc
11399
- gocyclo
@@ -120,25 +106,29 @@ linters:
120106
- funlen
121107
- gocognit
122108
- stylecheck
123-
- gomnd
109+
- mnd
124110
- testpackage
125111
- paralleltest
126112
- tparallel
127-
- goerr113
113+
- err113
128114
- wrapcheck
129115
- nestif
130116
- exhaustive
131117
- exhaustruct
132118
- forbidigo
133-
- ifshort
134119
- forcetypeassert
135120
- varnamelen
136-
- nosnakecase
137121
- nonamedreturns
138122
- nilnil
139123
- maintidx
140124
- dupword # false positives
141-
- errorlint # TODO: must be reactivate after fixes
125+
- errorlint # TODO: enable after fixes
126+
- errcheck # TODO: enable after fixes
127+
- revive # TODO: enable after fixes
128+
- fatcontext # TODO: enable after fixes
129+
- gocritic # TODO: enable after fixes
130+
- predeclared # TODO: enable after fixes
131+
- recvcheck # TODO: enable after fixes
142132

143133
issues:
144134
exclude-use-default: false

interp/interp_consistent_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ func TestInterpErrorConsistency(t *testing.T) {
293293
},
294294
{
295295
fileName: "switch13.go",
296-
expectedInterp: "9:2: i is not a type",
297-
expectedExec: "9:7: i (variable of type interface{}) is not a type",
296+
expectedInterp: "is not a type",
297+
expectedExec: "is not a type",
298298
},
299299
{
300300
fileName: "switch19.go",

interp/interp_eval_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ func eval(t *testing.T, i *interp.Interpreter, src string) reflect.Value {
900900
if err != nil {
901901
t.Logf("Error: %v", err)
902902
if e, ok := err.(interp.Panic); ok {
903-
t.Logf(string(e.Stack))
903+
t.Log(string(e.Stack))
904904
}
905905
t.FailNow()
906906
}
@@ -922,7 +922,7 @@ func assertEval(t *testing.T, i *interp.Interpreter, src, expectedError, expecte
922922
if err != nil {
923923
t.Logf("got an error: %v", err)
924924
if e, ok := err.(interp.Panic); ok {
925-
t.Logf(string(e.Stack))
925+
t.Log(string(e.Stack))
926926
}
927927
t.FailNow()
928928
}

0 commit comments

Comments
 (0)