Skip to content

Commit

Permalink
chore: bump golangci-lint and fix config (#1680)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mvertes authored Jan 8, 2025
1 parent e686f55 commit 14d3137
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
GO_VERSION: stable
GOLANGCI_LINT_VERSION: v1.56.2
GOLANGCI_LINT_VERSION: v1.63.4

jobs:

Expand Down
32 changes: 11 additions & 21 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run:

linters-settings:
govet:
check-shadowing: false
shadow: false
gocyclo:
min-complexity: 12
maligned:
Expand Down Expand Up @@ -92,22 +92,8 @@ linters-settings:
linters:
enable-all: true
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
- gas
- gosec
- dupl
- prealloc
- gocyclo
Expand All @@ -120,25 +106,29 @@ linters:
- funlen
- gocognit
- stylecheck
- gomnd
- mnd
- testpackage
- paralleltest
- tparallel
- goerr113
- err113
- wrapcheck
- nestif
- exhaustive
- exhaustruct
- forbidigo
- ifshort
- forcetypeassert
- varnamelen
- nosnakecase
- nonamedreturns
- nilnil
- maintidx
- 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:
exclude-use-default: false
Expand Down
4 changes: 2 additions & 2 deletions interp/interp_consistent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ func TestInterpErrorConsistency(t *testing.T) {
},
{
fileName: "switch13.go",
expectedInterp: "9:2: i is not a type",
expectedExec: "9:7: i (variable of type interface{}) is not a type",
expectedInterp: "is not a type",
expectedExec: "is not a type",
},
{
fileName: "switch19.go",
Expand Down
4 changes: 2 additions & 2 deletions interp/interp_eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ func eval(t *testing.T, i *interp.Interpreter, src string) reflect.Value {
if err != nil {
t.Logf("Error: %v", err)
if e, ok := err.(interp.Panic); ok {
t.Logf(string(e.Stack))
t.Log(string(e.Stack))
}
t.FailNow()
}
Expand All @@ -922,7 +922,7 @@ func assertEval(t *testing.T, i *interp.Interpreter, src, expectedError, expecte
if err != nil {
t.Logf("got an error: %v", err)
if e, ok := err.(interp.Panic); ok {
t.Logf(string(e.Stack))
t.Log(string(e.Stack))
}
t.FailNow()
}
Expand Down

0 comments on commit 14d3137

Please sign in to comment.