diff --git a/.golangci.yaml b/.golangci.yaml index 5990ea04..bdc11dbb 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -9,7 +9,7 @@ linters: - dupl - errcheck - exhaustive - - exportloopref + - copyloopvar - funlen # - gci - goconst @@ -23,7 +23,6 @@ linters: # - ineffassign # - ifshort - lll - - megacheck - misspell # - nlreturn # - nolintlint @@ -42,7 +41,6 @@ linters-settings: lines: 188 statements: 60 govet: - check-shadowing: true enable-all: true disable: - fieldalignment diff --git a/Dockerfile b/Dockerfile index e94c586f..f922327c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM docker.io/golang:1.21 as builder +FROM docker.io/golang:1.22 as builder ARG GIT_VERSION="(unset)" ARG COMMIT_ID="(unset)" ARG ARCH="" diff --git a/hack/install-tools.sh b/hack/install-tools.sh index a720f490..bc493baa 100755 --- a/hack/install-tools.sh +++ b/hack/install-tools.sh @@ -44,7 +44,7 @@ _install_revive() { } _install_golangci_lint() { - _install_tool github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 + _install_tool github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.2 } _install_yq() { @@ -52,7 +52,7 @@ _install_yq() { } _install_gosec() { - _install_tool github.com/securego/gosec/v2/cmd/gosec@v2.13.1 + _install_tool github.com/securego/gosec/v2/cmd/gosec@v2.20.0 } _install_gitlint() { diff --git a/internal/resources/smbshare.go b/internal/resources/smbshare.go index 2a65e301..38846439 100644 --- a/internal/resources/smbshare.go +++ b/internal/resources/smbshare.go @@ -851,7 +851,7 @@ func (m *SmbShareManager) setServerGroup( EventWarning, ReasonInvalidConfiguration, msg) - return false, fmt.Errorf(msg) + return false, fmt.Errorf("%s", msg) } case pln.GroupModeExplicit: if reqGroupName == "" { @@ -861,7 +861,7 @@ func (m *SmbShareManager) setServerGroup( EventWarning, ReasonInvalidConfiguration, msg) - return false, fmt.Errorf(msg) + return false, fmt.Errorf("%s", msg) } serverGroup = reqGroupName default: @@ -871,7 +871,7 @@ func (m *SmbShareManager) setServerGroup( EventWarning, ReasonInvalidConfiguration, msg) - return false, fmt.Errorf(msg) + return false, fmt.Errorf("%s", msg) } s.Status.ServerGroup = serverGroup