Skip to content

Commit

Permalink
chore(golangci-lint): code changes according to v1.62.2
Browse files Browse the repository at this point in the history
Signed-off-by: Dario Tranchitella <[email protected]>
  • Loading branch information
prometherion committed Dec 12, 2024
1 parent 4e781b8 commit 4ddb6fb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.55.2
version: v1.62.2
only-new-issues: false
args: --config .golangci.yml --timeout=5m
10 changes: 1 addition & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,14 @@ linters-settings:
template: |-
Copyright 2020-2024 Project Capsule Authors.
SPDX-License-Identifier: Apache-2.0
govet:
check-shadowing: true
maligned:
suggest-new: true
linters:
enable-all: true
disable:
- interfacer
- exportloopref
- godox
- golint
- scopelint
- maligned
- gochecknoglobals
- gochecknoinits
- exhaustivestruct
- exhaustruct
- ireturn
- lll
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/serviceaccount/tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func (r *ServiceAccountReconciler) getSATokenSecret(ctx context.Context, saName,
var tokenSecret *corev1.Secret

for _, v := range saTokenList.Items {
v := v
if v.Type == corev1.SecretTypeServiceAccountToken {
if v.Namespace == saNamespace && v.Annotations[corev1.ServiceAccountNameKey] == saName {
return &v, nil
Expand Down

0 comments on commit 4ddb6fb

Please sign in to comment.