Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make check updates to cope with oldest stable version go1.22 #345

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ linters:
- dupl
- errcheck
- exhaustive
- exportloopref
- copyloopvar
- funlen
# - gci
- goconst
Expand All @@ -23,7 +23,6 @@ linters:
# - ineffassign
# - ifshort
- lll
- megacheck
- misspell
# - nlreturn
# - nolintlint
Expand All @@ -42,7 +41,6 @@ linters-settings:
lines: 188
statements: 60
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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=""
Expand Down
4 changes: 2 additions & 2 deletions hack/install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ _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() {
_install_tool github.com/mikefarah/yq/[email protected]
}

_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() {
Expand Down
6 changes: 3 additions & 3 deletions internal/resources/smbshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand All @@ -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:
Expand All @@ -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
Expand Down
Loading