mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: remove unnecessary redeclarations in for loops (#18440)
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user