Skip to content

Commit

Permalink
Bump golangci-lint version from 1.51 to 1.61
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Oct 4, 2024
1 parent 87ac43b commit b6f6991
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

env:
GO_VERSION: "1.20"
GO_VERSION: "1.23"

jobs:
lint:
Expand All @@ -30,10 +30,10 @@ jobs:
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
with:
version: v1.51.0
only-new-issues: true
version: v1.61.0
args: --timeout=15m --config=.golangci.yml
skip-cache: true
skip-build-cache: true

unit-tests:
name: Unit Tests
Expand Down
25 changes: 10 additions & 15 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
linter-settings:
lll:
line-length: 200

timeout: 10m

run:
skip-dirs:
# This directory contains copy code from upstream kubernetes/kubernetes, skip it.
- internal/kubernetes
# This is mostly copied from upstream, rather than fixing that code here just ignore the errors.
- internal/podutils
timeout: 10m

linters:
enable:
- errcheck
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
- goimports
- ineffassign
- vet
- govet
- unused
- misspell
- gosec
- exportloopref # Checks for pointers to enclosing loop variables
- copyloopvar
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17

linters-settings:
lll:
line-length: 200
gosec:
excludes:
- G304
issues:
exclude-dirs:
# This directory contains copy code from upstream kubernetes/kubernetes, skip it.
- internal/kubernetes
# This is mostly copied from upstream, rather than fixing that code here just ignore the errors.
- internal/podutils
exclude-use-default: false
exclude:
# EXC0001 errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
Expand Down

0 comments on commit b6f6991

Please sign in to comment.