chore: remove unnecessary redeclarations in for loops (#18440)

This commit is contained in:
ケイラ
2025-06-20 13:16:55 -06:00
committed by GitHub
parent 4fe0a4bca2
commit fae30a00fd
200 changed files with 0 additions and 431 deletions
-1
View File
@@ -31,7 +31,6 @@ func TestGeneration(t *testing.T) {
// Only test directories
continue
}
f := f
t.Run(f.Name(), func(t *testing.T) {
t.Parallel()
dir := filepath.Join(".", "testdata", f.Name())
-2
View File
@@ -115,7 +115,6 @@ Enjoy.
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
if diff := cmp.Diff(removeMainlineBlurb(tt.body), tt.want); diff != "" {
@@ -167,7 +166,6 @@ func Test_release_autoversion(t *testing.T) {
require.NoError(t, err)
for _, file := range files {
file := file
t.Run(file, func(t *testing.T) {
t.Parallel()
-1
View File
@@ -230,7 +230,6 @@ func hasMigrationDiff(dir string, a, b string) ([]string, error) {
migrations := strings.Split(strings.TrimSpace(string(output)), "\n")
filtered := make([]string, 0, len(migrations))
for _, migration := range migrations {
migration := migration
if strings.Contains(migration, "fixtures") {
continue
}
-1
View File
@@ -243,7 +243,6 @@ func generateRbacObjects(templateSource string) ([]byte, error) {
var out bytes.Buffer
list := make([]Definition, 0)
for t, v := range policy.RBACPermissions {
v := v
list = append(list, Definition{
PermissionDefinition: v,
Type: t,