Skip to content

Commit

Permalink
fix exportloopref linter
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
  • Loading branch information
inteon committed Apr 30, 2024
1 parent 6fc8034 commit f96d31e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ issues:
- nilnil
- nakedret
- musttag
- exportloopref
- gomoddirectives
text: ".*"
- linters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func TestGeneratesNewPrivateKeyIfMarkedInvalidRequest(t *testing.T) {
t.Fatalf("failed to update certificate: %v", err)
}

var secondReq *cmapi.CertificateRequest
var secondReq cmapi.CertificateRequest
if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*500, time.Second*10, true, func(ctx context.Context) (bool, error) {
reqs, err := cmCl.CertmanagerV1().CertificateRequests(namespace).List(ctx, metav1.ListOptions{})
if err != nil {
Expand All @@ -151,7 +151,7 @@ func TestGeneratesNewPrivateKeyIfMarkedInvalidRequest(t *testing.T) {
continue
}

secondReq = &req // #nosec G601 -- False positive. See https://github.com/golang/go/discussions/56010
secondReq = req
return true, nil
}

Expand Down Expand Up @@ -273,7 +273,7 @@ func TestGeneratesNewPrivateKeyPerRequest(t *testing.T) {
t.Fatalf("failed to update certificate: %v", err)
}

var secondReq *cmapi.CertificateRequest
var secondReq cmapi.CertificateRequest
if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*500, time.Second*10, true, func(ctx context.Context) (bool, error) {
reqs, err := cmCl.CertmanagerV1().CertificateRequests(namespace).List(ctx, metav1.ListOptions{})
if err != nil {
Expand All @@ -288,7 +288,7 @@ func TestGeneratesNewPrivateKeyPerRequest(t *testing.T) {
continue
}

secondReq = &req // #nosec G601 -- False positive. See https://github.com/golang/go/discussions/56010
secondReq = req
return true, nil
}

Expand Down

0 comments on commit f96d31e

Please sign in to comment.