Skip to content

Commit 55d3bc0

Browse files
authored
chore: enabled exportloopref linter (argoproj#6855)
Signed-off-by: Sean Trantalis <[email protected]>
1 parent 25940a8 commit 55d3bc0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.golangci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ linters:
2323
- goimports
2424
# only minor issues
2525
# - errorlint
26-
# TODO https://github.com/argoproj/argo-workflows/issues/6840
27-
# - exportloopref
26+
- exportloopref
2827
- gci
2928
- gosec
3029
- gosimple

workflow/controller/operator_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,7 @@ func TestSidecarResourceLimits(t *testing.T) {
18201820
assert.NoError(t, err)
18211821
var waitCtr *apiv1.Container
18221822
for _, ctr := range pod.Spec.Containers {
1823+
ctr := ctr
18231824
if ctr.Name == "wait" {
18241825
waitCtr = &ctr
18251826
break

workflow/controller/workflowpod_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ func Test_createWorkflowPod_rateLimited(t *testing.T) {
620620
{Limit: 0, Burst: 1}: false,
621621
{Limit: 1, Burst: 1}: false,
622622
} {
623+
limit := limit
623624
t.Run(fmt.Sprintf("%v", limit), func(t *testing.T) {
624625
wf := wfv1.MustUnmarshalWorkflow(helloWorldWf)
625626
cancel, controller := newController(wf, func(c *WorkflowController) {

0 commit comments

Comments
 (0)