chore: remove loop var references

This commit is contained in:
Florian Schade
2026-04-23 15:30:09 +02:00
committed by Ralf Haferkamp
parent 900ecf736e
commit d0e3f14539
9 changed files with 0 additions and 15 deletions

View File

@@ -417,7 +417,6 @@ func TestParse_Spec(t *testing.T) {
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
testKQL(t, tc)
})
@@ -851,7 +850,6 @@ func TestParse_DateTimeRestrictionNode(t *testing.T) {
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
testKQL(t, tc)
})
@@ -909,7 +907,6 @@ func TestParse_Errors(t *testing.T) {
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
testKQL(t, tc)
})
@@ -964,7 +961,6 @@ func TestParse_DottedKey(t *testing.T) {
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
testKQL(t, tc)
})
@@ -1421,7 +1417,6 @@ func TestParse_Stress(t *testing.T) {
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
testKQL(t, tc)
})

View File

@@ -31,7 +31,6 @@ func TestNewAST(t *testing.T) {
assert := tAssert.New(t)
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
got, err := kql.Builder{}.Build(tt.givenQuery)

View File

@@ -52,8 +52,6 @@ func TestJailJoin(t *testing.T) {
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

View File

@@ -145,7 +145,6 @@ var _ = Describe("ActivitylogService", func() {
}
for _, tc := range testCases {
tc := tc // capture range variable
Context(tc.Name, func() {
JustBeforeEach(func() {
getResource = func(_ context.Context, ref *provider.Reference) (*provider.ResourceInfo, error) {

View File

@@ -129,7 +129,6 @@ func TestRegexSelector(t *testing.T) {
}
for _, tc := range tests {
tc := tc // capture range variable
t.Run(tc.Name, func(t *testing.T) {
r := httptest.NewRequest("GET", "https://example.com", nil)
nr := r.WithContext(tc.Context)

View File

@@ -28,7 +28,6 @@ func TestCleanContent(t *testing.T) {
}
for _, tc := range tests {
tc := tc
t.Run(tc.given, func(t *testing.T) {
Equal(t, tc.expect, content.CleanString(tc.given, "en"))
})

View File

@@ -87,7 +87,6 @@ func TestProcessorFor(t *testing.T) {
assert := tAssert.New(t)
for _, tt := range tests {
tt := tt
t.Run("", func(t *testing.T) {
p, e := thumbnail.ProcessorFor(tt.id, tt.fileType)
assert.Equal(p.ID(), tt.wantP.ID())

View File

@@ -56,7 +56,6 @@ func TestFileSystem_BuildKey(t *testing.T) {
assert := tAssert.New(t)
for _, tt := range tests {
tt := tt
t.Run("", func(t *testing.T) {
assert.Equal(s.BuildKey(tt.r), tt.want)
})

View File

@@ -100,8 +100,6 @@ func TestFileServer(t *testing.T) {
expected: "some file content",
},
} {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()