From d6bacfa69cc23c71a4bfe95d6d08d76ee5c25f4b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 13 Dec 2024 14:58:20 +0100 Subject: [PATCH] update golangci-lint to v1.62 Update config file for the new version, and removed some linters that were deprecated and removed; WARN The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. ERRO [linters_context] deadcode: This linter is fully inactivated: it will not produce any reports. ERRO [linters_context] varcheck: This linter is fully inactivated: it will not produce any reports. Signed-off-by: Sebastiaan van Stijn --- .golangci.yml | 13 +++++-------- Dockerfile | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 6c65571..56a199f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,7 +3,6 @@ run: linters: enable: - - deadcode - depguard - gofmt - goimports @@ -13,7 +12,6 @@ linters: - ineffassign - misspell - typecheck - - varcheck - errname - makezero - whitespace @@ -21,12 +19,11 @@ linters: linters-settings: depguard: - list-type: blacklist - include-go-root: true - packages: - # The io/ioutil package has been deprecated. - # https://go.dev/doc/go1.16#ioutil - - io/ioutil + rules: + main: + deny: + - pkg: io/ioutil + desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil importas: no-unaliased: true diff --git a/Dockerfile b/Dockerfile index f0e2739..7219991 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. ARG GO_VERSION="1.18" -ARG GOLANGCI_LINT_VERSION="v1.45" +ARG GOLANGCI_LINT_VERSION="v1.62" ARG ADDLICENSE_VERSION="v1.0.0" ARG LICENSE_ARGS="-c cli-docs-tool -l apache"