update golangci-lint to .v1.59.0

full diff: https://github.com/golangci/golangci-lint/compare/v1.55.2...v1.59.0

Updated config to address warnings:

    WARN [config_reader] The configuration option `run.skip-files` is deprecated, please use `issues.exclude-files`.
    WARN [config_reader] The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2024-06-10 20:00:55 +02:00
parent df474d5176
commit 43b97e8880
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 7 additions and 5 deletions

View File

@ -44,9 +44,6 @@ linters:
run: run:
timeout: 5m timeout: 5m
skip-files:
- cli/compose/schema/bindata.go
- .*generated.*
linters-settings: linters-settings:
depguard: depguard:
@ -58,7 +55,8 @@ linters-settings:
gocyclo: gocyclo:
min-complexity: 16 min-complexity: 16
govet: govet:
check-shadowing: true enable:
- shadow
settings: settings:
shadow: shadow:
strict: true strict: true
@ -94,6 +92,10 @@ issues:
exclude: exclude:
- parameter .* always receives - parameter .* always receives
exclude-files:
- cli/compose/schema/bindata.go
- .*generated.*
exclude-rules: exclude-rules:
# We prefer to use an "exclude-list" so that new "default" exclusions are not # We prefer to use an "exclude-list" so that new "default" exclusions are not
# automatically inherited. We can decide whether or not to follow upstream # automatically inherited. We can decide whether or not to follow upstream

View File

@ -2,7 +2,7 @@
ARG GO_VERSION=1.21.11 ARG GO_VERSION=1.21.11
ARG ALPINE_VERSION=3.20 ARG ALPINE_VERSION=3.20
ARG GOLANGCI_LINT_VERSION=v1.55.2 ARG GOLANGCI_LINT_VERSION=v1.59.0
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint