Skip to content

Commit a5ea595

Browse files
committed
hack: Bump golangci-lint to v1.60.2
- The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar. - The linter named \"megacheck\" is deprecated. It has been split into: gosimple, staticcheck, unused. - The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`. Also fixes all occurrence of "Error: printf: non-constant format string in call to fmt.Errorf (govet)" error. Signed-off-by: Anoop C S <[email protected]>
1 parent 425648e commit a5ea595

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

.golangci.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ linters:
99
- dupl
1010
- errcheck
1111
- exhaustive
12-
- exportloopref
1312
- funlen
1413
# - gci
1514
- goconst
@@ -23,7 +22,6 @@ linters:
2322
# - ineffassign
2423
# - ifshort
2524
- lll
26-
- megacheck
2725
- misspell
2826
# - nlreturn
2927
# - nolintlint
@@ -42,7 +40,6 @@ linters-settings:
4240
lines: 188
4341
statements: 60
4442
govet:
45-
check-shadowing: true
4643
enable-all: true
4744
disable:
4845
- fieldalignment

hack/install-tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _install_revive() {
4444
}
4545

4646
_install_golangci_lint() {
47-
_install_tool github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
47+
_install_tool github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.2
4848
}
4949

5050
_install_yq() {

internal/resources/smbshare.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ func (m *SmbShareManager) setServerGroup(
851851
EventWarning,
852852
ReasonInvalidConfiguration,
853853
msg)
854-
return false, fmt.Errorf(msg)
854+
return false, fmt.Errorf("%s", msg)
855855
}
856856
case pln.GroupModeExplicit:
857857
if reqGroupName == "" {
@@ -861,7 +861,7 @@ func (m *SmbShareManager) setServerGroup(
861861
EventWarning,
862862
ReasonInvalidConfiguration,
863863
msg)
864-
return false, fmt.Errorf(msg)
864+
return false, fmt.Errorf("%s", msg)
865865
}
866866
serverGroup = reqGroupName
867867
default:
@@ -871,7 +871,7 @@ func (m *SmbShareManager) setServerGroup(
871871
EventWarning,
872872
ReasonInvalidConfiguration,
873873
msg)
874-
return false, fmt.Errorf(msg)
874+
return false, fmt.Errorf("%s", msg)
875875
}
876876

877877
s.Status.ServerGroup = serverGroup

0 commit comments

Comments
 (0)