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
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: stable
|
GO_VERSION: stable
|
||||||
GOLANGCI_LINT_VERSION: v1.56.2
|
GOLANGCI_LINT_VERSION: v1.63.4
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ run:
|
|||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
govet:
|
govet:
|
||||||
check-shadowing: false
|
shadow: false
|
||||||
gocyclo:
|
gocyclo:
|
||||||
min-complexity: 12
|
min-complexity: 12
|
||||||
maligned:
|
maligned:
|
||||||
@@ -92,22 +92,8 @@ linters-settings:
|
|||||||
linters:
|
linters:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
disable:
|
disable:
|
||||||
- deadcode # deprecated
|
|
||||||
- exhaustivestruct # deprecated
|
|
||||||
- golint # deprecated
|
|
||||||
- ifshort # deprecated
|
|
||||||
- interfacer # deprecated
|
|
||||||
- maligned # deprecated
|
|
||||||
- nosnakecase # deprecated
|
|
||||||
- scopelint # deprecated
|
|
||||||
- structcheck # deprecated
|
|
||||||
- varcheck # deprecated
|
|
||||||
- cyclop # duplicate of gocyclo
|
|
||||||
- sqlclosecheck # not relevant (SQL)
|
|
||||||
- rowserrcheck # not relevant (SQL)
|
|
||||||
- execinquery # not relevant (SQL)
|
|
||||||
- lll
|
- lll
|
||||||
- gas
|
- gosec
|
||||||
- dupl
|
- dupl
|
||||||
- prealloc
|
- prealloc
|
||||||
- gocyclo
|
- gocyclo
|
||||||
@@ -120,25 +106,29 @@ linters:
|
|||||||
- funlen
|
- funlen
|
||||||
- gocognit
|
- gocognit
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- gomnd
|
- mnd
|
||||||
- testpackage
|
- testpackage
|
||||||
- paralleltest
|
- paralleltest
|
||||||
- tparallel
|
- tparallel
|
||||||
- goerr113
|
- err113
|
||||||
- wrapcheck
|
- wrapcheck
|
||||||
- nestif
|
- nestif
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- exhaustruct
|
- exhaustruct
|
||||||
- forbidigo
|
- forbidigo
|
||||||
- ifshort
|
|
||||||
- forcetypeassert
|
- forcetypeassert
|
||||||
- varnamelen
|
- varnamelen
|
||||||
- nosnakecase
|
|
||||||
- nonamedreturns
|
- nonamedreturns
|
||||||
- nilnil
|
- nilnil
|
||||||
- maintidx
|
- maintidx
|
||||||
- dupword # false positives
|
- dupword # false positives
|
||||||
- errorlint # TODO: must be reactivate after fixes
|
- errorlint # TODO: enable after fixes
|
||||||
|
- errcheck # TODO: enable after fixes
|
||||||
|
- revive # TODO: enable after fixes
|
||||||
|
- fatcontext # TODO: enable after fixes
|
||||||
|
- gocritic # TODO: enable after fixes
|
||||||
|
- predeclared # TODO: enable after fixes
|
||||||
|
- recvcheck # TODO: enable after fixes
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-use-default: false
|
exclude-use-default: false
|
||||||
|
|||||||
@@ -293,8 +293,8 @@ func TestInterpErrorConsistency(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
fileName: "switch13.go",
|
fileName: "switch13.go",
|
||||||
expectedInterp: "9:2: i is not a type",
|
expectedInterp: "is not a type",
|
||||||
expectedExec: "9:7: i (variable of type interface{}) is not a type",
|
expectedExec: "is not a type",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fileName: "switch19.go",
|
fileName: "switch19.go",
|
||||||
|
|||||||
@@ -900,7 +900,7 @@ func eval(t *testing.T, i *interp.Interpreter, src string) reflect.Value {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Logf("Error: %v", err)
|
t.Logf("Error: %v", err)
|
||||||
if e, ok := err.(interp.Panic); ok {
|
if e, ok := err.(interp.Panic); ok {
|
||||||
t.Logf(string(e.Stack))
|
t.Log(string(e.Stack))
|
||||||
}
|
}
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
@@ -922,7 +922,7 @@ func assertEval(t *testing.T, i *interp.Interpreter, src, expectedError, expecte
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Logf("got an error: %v", err)
|
t.Logf("got an error: %v", err)
|
||||||
if e, ok := err.(interp.Panic); ok {
|
if e, ok := err.(interp.Panic); ok {
|
||||||
t.Logf(string(e.Stack))
|
t.Log(string(e.Stack))
|
||||||
}
|
}
|
||||||
t.FailNow()
|
t.FailNow()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user