From 1dba0fa8ec0f5cea5fc541bb5d066f08e901db1c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 10 Jun 2024 20:00:55 +0200 Subject: [PATCH] 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 (cherry picked from commit 43b97e8880385566780ecc9d86e400dba493f0b4) Signed-off-by: Cory Snider --- .golangci.yml | 13 +++++++++---- dockerfiles/Dockerfile.lint | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5553fb5337..2a0499d968 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,9 +26,6 @@ linters: run: timeout: 5m - skip-files: - - cli/compose/schema/bindata.go - - .*generated.* linters-settings: depguard: @@ -40,7 +37,11 @@ linters-settings: gocyclo: min-complexity: 16 govet: - check-shadowing: false + enable: + - shadow + settings: + shadow: + strict: true lll: line-length: 200 nakedret: @@ -54,6 +55,10 @@ issues: exclude: - parameter .* always receives + exclude-files: + - cli/compose/schema/bindata.go + - .*generated.* + exclude-rules: # 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 diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index 108ce408ab..d292e593f2 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -2,7 +2,7 @@ ARG GO_VERSION=1.21.13 ARG ALPINE_VERSION=3.20 -ARG GOLANGCI_LINT_VERSION=v1.55.0 +ARG GOLANGCI_LINT_VERSION=v1.59.0 FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint