From af3453493b1fa51fdb74b8e07c7062693ec36e53 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Aug 2023 02:19:35 +0200 Subject: [PATCH] update golangci-lint to v1.54.2 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit cd49f9affdad81360620019b6e8741ae73fd5590) Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 2 +- daemon/logger/splunk/splunk.go | 2 +- hack/validate/golangci-lint.yml | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index d933c13e22..138712031b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -222,7 +222,7 @@ FROM binary-dummy AS containerd-windows FROM containerd-${TARGETOS} AS containerd FROM base AS golangci_lint -ARG GOLANGCI_LINT_VERSION=v1.51.2 +ARG GOLANGCI_LINT_VERSION=v1.54.2 RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ GOBIN=/build/ GO111MODULE=on go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}" \ diff --git a/daemon/logger/splunk/splunk.go b/daemon/logger/splunk/splunk.go index d194334dad..7b495d24c2 100644 --- a/daemon/logger/splunk/splunk.go +++ b/daemon/logger/splunk/splunk.go @@ -37,7 +37,7 @@ const ( splunkCANameKey = "splunk-caname" splunkInsecureSkipVerifyKey = "splunk-insecureskipverify" splunkFormatKey = "splunk-format" - splunkVerifyConnectionKey = "splunk-verify-connection" + splunkVerifyConnectionKey = "splunk-verify-connection" // #nosec G101 -- ignoring: Potential hardcoded credentials (gosec) splunkGzipCompressionKey = "splunk-gzip" splunkGzipCompressionLevelKey = "splunk-gzip-level" splunkIndexAcknowledgment = "splunk-index-acknowledgment" diff --git a/hack/validate/golangci-lint.yml b/hack/validate/golangci-lint.yml index 8677fb460e..49f199ae2e 100644 --- a/hack/validate/golangci-lint.yml +++ b/hack/validate/golangci-lint.yml @@ -27,12 +27,11 @@ linters-settings: govet: check-shadowing: false 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 revive: rules: # FIXME make sure all packages have a description. Currently, there's many packages without.