Skip to content

Commit 6fe7a3f

Browse files
committed
chore(golangci-lint): code changes according to v1.62.2
Signed-off-by: Dario Tranchitella <[email protected]>
1 parent 2733d60 commit 6fe7a3f

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

.github/workflows/lint-code.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: Run golangci-lint
2121
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
2222
with:
23-
version: v1.55.2
23+
version: v1.62.2
2424
only-new-issues: false
2525
args: --config .golangci.yml --timeout=5m

.golangci.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,14 @@ linters-settings:
3030
template: |-
3131
Copyright 2020-2024 Project Capsule Authors.
3232
SPDX-License-Identifier: Apache-2.0
33-
govet:
34-
check-shadowing: true
35-
maligned:
36-
suggest-new: true
3733
3834
linters:
3935
enable-all: true
4036
disable:
41-
- interfacer
37+
- exportloopref
4238
- godox
43-
- golint
44-
- scopelint
45-
- maligned
4639
- gochecknoglobals
4740
- gochecknoinits
48-
- exhaustivestruct
4941
- exhaustruct
5042
- ireturn
5143
- lll

pkg/controller/serviceaccount/tokens.go

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ func (r *ServiceAccountReconciler) getSATokenSecret(ctx context.Context, saName,
5959
var tokenSecret *corev1.Secret
6060

6161
for _, v := range saTokenList.Items {
62-
v := v
6362
if v.Type == corev1.SecretTypeServiceAccountToken {
6463
if v.Namespace == saNamespace && v.Annotations[corev1.ServiceAccountNameKey] == saName {
6564
return &v, nil

0 commit comments

Comments
 (0)