Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 40fd4ac

Browse files
committed
fix claude nonsense
1 parent d8ea897 commit 40fd4ac

File tree

178 files changed

+1
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+1
-302
lines changed

agent/agent.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ func (a *agent) reportMetadata(ctx context.Context, aAPI proto.DRPCAgentClient26
547547
// channel to synchronize the results and avoid both messy
548548
// mutex logic and overloading the API.
549549
for _, md := range manifest.Metadata {
550-
551550
// We send the result to the channel in the goroutine to avoid
552551
// sending the same result multiple times. So, we don't care about
553552
// the return values.

agent/agent_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ func TestAgent_Stats_SSH(t *testing.T) {
130130
t.Parallel()
131131

132132
for _, port := range sshPorts {
133-
134133
t.Run(fmt.Sprintf("(:%d)", port), func(t *testing.T) {
135134
t.Parallel()
136135

@@ -342,7 +341,6 @@ func TestAgent_SessionExec(t *testing.T) {
342341
t.Parallel()
343342

344343
for _, port := range sshPorts {
345-
346344
t.Run(fmt.Sprintf("(:%d)", port), func(t *testing.T) {
347345
t.Parallel()
348346

@@ -468,7 +466,6 @@ func TestAgent_SessionTTYShell(t *testing.T) {
468466
}
469467

470468
for _, port := range sshPorts {
471-
472469
t.Run(fmt.Sprintf("(%d)", port), func(t *testing.T) {
473470
t.Parallel()
474471

@@ -611,7 +608,6 @@ func TestAgent_Session_TTY_MOTD(t *testing.T) {
611608
}
612609

613610
for _, test := range tests {
614-
615611
t.Run(test.name, func(t *testing.T) {
616612
t.Parallel()
617613
session := setupSSHSession(t, test.manifest, test.banner, func(fs afero.Fs) {
@@ -688,15 +684,13 @@ func TestAgent_Session_TTY_MOTD_Update(t *testing.T) {
688684

689685
//nolint:paralleltest // These tests need to swap the banner func.
690686
for _, port := range sshPorts {
691-
692687
sshClient, err := conn.SSHClientOnPort(ctx, port)
693688
require.NoError(t, err)
694689
t.Cleanup(func() {
695690
_ = sshClient.Close()
696691
})
697692

698693
for i, test := range tests {
699-
700694
t.Run(fmt.Sprintf("(:%d)/%d", port, i), func(t *testing.T) {
701695
// Set new banner func and wait for the agent to call it to update the
702696
// banner.
@@ -1209,7 +1203,6 @@ func TestAgent_CoderEnvVars(t *testing.T) {
12091203
t.Parallel()
12101204

12111205
for _, key := range []string{"CODER", "CODER_WORKSPACE_NAME", "CODER_WORKSPACE_AGENT_NAME"} {
1212-
12131206
t.Run(key, func(t *testing.T) {
12141207
t.Parallel()
12151208

@@ -1232,7 +1225,6 @@ func TestAgent_SSHConnectionEnvVars(t *testing.T) {
12321225
// For some reason this test produces a TTY locally and a non-TTY in CI
12331226
// so we don't test for the absence of SSH_TTY.
12341227
for _, key := range []string{"SSH_CONNECTION", "SSH_CLIENT"} {
1235-
12361228
t.Run(key, func(t *testing.T) {
12371229
t.Parallel()
12381230

@@ -1275,7 +1267,6 @@ func TestAgent_SSHConnectionLoginVars(t *testing.T) {
12751267
},
12761268
}
12771269
for _, tt := range tests {
1278-
12791270
t.Run(tt.key, func(t *testing.T) {
12801271
t.Parallel()
12811272

@@ -1795,7 +1786,6 @@ func TestAgent_ReconnectingPTY(t *testing.T) {
17951786
t.Setenv("LANG", "C")
17961787

17971788
for _, backendType := range backends {
1798-
17991789
t.Run(backendType, func(t *testing.T) {
18001790
if backendType == "Screen" {
18011791
if runtime.GOOS != "linux" {
@@ -2495,7 +2485,6 @@ func TestAgent_Dial(t *testing.T) {
24952485
}
24962486

24972487
for _, c := range cases {
2498-
24992488
t.Run(c.name, func(t *testing.T) {
25002489
t.Parallel()
25012490

agent/agentssh/x11_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ func Test_addXauthEntry(t *testing.T) {
228228
require.NoError(t, err)
229229

230230
for _, tt := range tests {
231-
232231
t.Run(tt.name, func(t *testing.T) {
233232
t.Parallel()
234233

agent/proto/resourcesmonitor/queue_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ func TestResourceMonitorQueue(t *testing.T) {
6565
}
6666

6767
for _, tt := range tests {
68-
6968
t.Run(tt.name, func(t *testing.T) {
7069
t.Parallel()
7170
queue := resourcesmonitor.NewQueue(20)

agent/proto/resourcesmonitor/resources_monitor_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ func TestPushResourcesMonitoringWithConfig(t *testing.T) {
195195
}
196196

197197
for _, tt := range tests {
198-
199198
t.Run(tt.name, func(t *testing.T) {
200199
t.Parallel()
201200

buildinfo/buildinfo_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ func TestBuildInfo(t *testing.T) {
9393
}
9494

9595
for _, c := range cases {
96-
9796
t.Run(c.name, func(t *testing.T) {
9897
t.Parallel()
9998
require.Equal(t, c.expectMatch, buildinfo.VersionsMatch(c.v1, c.v2),

cli/agent_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func Test_extractPort(t *testing.T) {
5454
},
5555
}
5656
for _, tt := range tests {
57-
5857
t.Run(tt.name, func(t *testing.T) {
5958
t.Parallel()
6059
got, err := extractPort(tt.urlString)

cli/autoupdate_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ func TestAutoUpdate(t *testing.T) {
6262
}
6363

6464
for _, c := range cases {
65-
6665
t.Run(c.Name, func(t *testing.T) {
6766
t.Parallel()
6867
client := coderdtest.New(t, nil)

cli/clitest/golden.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ ExtractCommandPathsLoop:
7171
}
7272

7373
for _, tt := range cases {
74-
7574
t.Run(tt.Name, func(t *testing.T) {
7675
t.Parallel()
7776
ctx := testutil.Context(t, testutil.WaitLong)

cli/cliui/agent_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,6 @@ func TestPeerDiagnostics(t *testing.T) {
648648
},
649649
}
650650
for _, tc := range testCases {
651-
652651
t.Run(tc.name, func(t *testing.T) {
653652
t.Parallel()
654653
r, w := io.Pipe()
@@ -852,7 +851,6 @@ func TestConnDiagnostics(t *testing.T) {
852851
},
853852
}
854853
for _, tc := range testCases {
855-
856854
t.Run(tc.name, func(t *testing.T) {
857855
t.Parallel()
858856
r, w := io.Pipe()

cli/cliui/provisionerjob_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ func TestProvisionerJob(t *testing.T) {
124124
}
125125

126126
for _, tc := range tests {
127-
128127
t.Run(tc.name, func(t *testing.T) {
129128
t.Parallel()
130129

cli/cliui/resources_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ func TestRenderAgentVersion(t *testing.T) {
4040
},
4141
}
4242
for _, testCase := range testCases {
43-
4443
t.Run(testCase.name, func(t *testing.T) {
4544
t.Parallel()
4645
actual := renderAgentVersion(testCase.agentVersion, testCase.serverVersion)

cli/cliui/table_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ foo <nil> 10 [a, b, c] foo1 11 foo2 12 fo
169169
// Test with pointer values.
170170
inPtr := make([]*tableTest1, len(in))
171171
for i, v := range in {
172-
173172
inPtr[i] = &v
174173
}
175174
out, err = cliui.DisplayTable(inPtr, "", nil)

cli/configssh_internal_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ func Test_sshConfigSplitOnCoderSection(t *testing.T) {
118118
}
119119

120120
for _, tc := range testCases {
121-
122121
t.Run(tc.Name, func(t *testing.T) {
123122
t.Parallel()
124123

@@ -157,7 +156,6 @@ func Test_sshConfigProxyCommandEscape(t *testing.T) {
157156
}
158157
// nolint:paralleltest // Fixes a flake
159158
for _, tt := range tests {
160-
161159
t.Run(tt.name, func(t *testing.T) {
162160
if runtime.GOOS == "windows" {
163161
t.Skip("Windows doesn't typically execute via /bin/sh or cmd.exe, so this test is not applicable.")
@@ -207,7 +205,6 @@ func Test_sshConfigMatchExecEscape(t *testing.T) {
207205
}
208206
// nolint:paralleltest // Fixes a flake
209207
for _, tt := range tests {
210-
211208
t.Run(tt.name, func(t *testing.T) {
212209
cmd := "/bin/sh"
213210
arg := "-c"
@@ -290,7 +287,6 @@ func Test_sshConfigExecEscapeSeparatorForce(t *testing.T) {
290287
},
291288
}
292289
for _, tt := range tests {
293-
294290
t.Run(tt.name, func(t *testing.T) {
295291
t.Parallel()
296292
found, err := sshConfigProxyCommandEscape(tt.path, tt.forceUnix)
@@ -366,7 +362,6 @@ func Test_sshConfigOptions_addOption(t *testing.T) {
366362
}
367363

368364
for _, tt := range testCases {
369-
370365
t.Run(tt.Name, func(t *testing.T) {
371366
t.Parallel()
372367

cli/configssh_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
688688
},
689689
}
690690
for _, tt := range tests {
691-
692691
t.Run(tt.name, func(t *testing.T) {
693692
t.Parallel()
694693

cli/exp_errors_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ ExtractCommandPathsLoop:
4949
}
5050

5151
for _, tt := range cases {
52-
5352
t.Run(tt.Name, func(t *testing.T) {
5453
t.Parallel()
5554

cli/notifications_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ func TestNotifications(t *testing.T) {
4848
}
4949

5050
for _, tt := range tests {
51-
5251
t.Run(tt.name, func(t *testing.T) {
5352
t.Parallel()
5453

cli/open_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func Test_resolveAgentAbsPath(t *testing.T) {
4747
{"fail with no working directory and rel path on windows", args{relOrAbsPath: "my\\path", agentOS: "windows"}, "", true},
4848
}
4949
for _, tt := range tests {
50-
5150
t.Run(tt.name, func(t *testing.T) {
5251
t.Parallel()
5352

cli/open_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ func TestOpenVSCode(t *testing.T) {
113113
}
114114

115115
for _, tt := range tests {
116-
117116
t.Run(tt.name, func(t *testing.T) {
118117
t.Parallel()
119118

@@ -240,7 +239,6 @@ func TestOpenVSCode_NoAgentDirectory(t *testing.T) {
240239
}
241240

242241
for _, tt := range tests {
243-
244242
t.Run(tt.name, func(t *testing.T) {
245243
t.Parallel()
246244

@@ -414,7 +412,6 @@ func TestOpenVSCodeDevContainer(t *testing.T) {
414412
}
415413

416414
for _, tt := range tests {
417-
418415
t.Run(tt.name, func(t *testing.T) {
419416
t.Parallel()
420417

@@ -578,7 +575,6 @@ func TestOpenVSCodeDevContainer_NoAgentDirectory(t *testing.T) {
578575
}
579576

580577
for _, tt := range tests {
581-
582578
t.Run(tt.name, func(t *testing.T) {
583579
t.Parallel()
584580

cli/organizationroles.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ func applyOrgResourceActions(role *codersdk.Role, resource string, actions []str
435435
// Construct new site perms with only new perms for the resource
436436
keep := make([]codersdk.Permission, 0)
437437
for _, perm := range role.OrganizationPermissions {
438-
439438
if string(perm.ResourceType) != resource {
440439
keep = append(keep, perm)
441440
}

cli/organizationsettings.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ func (r *RootCmd) setOrganizationSettings(orgContext *OrganizationContext, setti
116116
}
117117

118118
for _, set := range settings {
119-
120119
patch := set.Patch
121120
cmd.Children = append(cmd.Children, &serpent.Command{
122121
Use: set.Name,
@@ -192,7 +191,6 @@ func (r *RootCmd) printOrganizationSetting(orgContext *OrganizationContext, sett
192191
}
193192

194193
for _, set := range settings {
195-
196194
fetch := set.Fetch
197195
cmd.Children = append(cmd.Children, &serpent.Command{
198196
Use: set.Name,

cli/portforward_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func Test_parsePortForwards(t *testing.T) {
103103
},
104104
}
105105
for _, tt := range tests {
106-
107106
t.Run(tt.name, func(t *testing.T) {
108107
t.Parallel()
109108

cli/portforward_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ func TestPortForward(t *testing.T) {
145145
)
146146

147147
for _, c := range cases {
148-
149148
t.Run(c.name+"_OnePort", func(t *testing.T) {
150149
t.Parallel()
151150
p1 := setupTestListener(t, c.setupRemote(t))

cli/root_internal_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ func Test_formatExamples(t *testing.T) {
7676
},
7777
}
7878
for _, tt := range tests {
79-
8079
t.Run(tt.name, func(t *testing.T) {
8180
t.Parallel()
8281

cli/schedule_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ func TestScheduleOverride(t *testing.T) {
341341
}
342342

343343
for _, tt := range tests {
344-
345344
t.Run(tt.command, func(t *testing.T) {
346345
// Given
347346
// Set timezone to Asia/Kolkata to surface any timezone-related bugs.

cli/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,6 @@ func configureServerTLS(ctx context.Context, logger slog.Logger, tlsMinVersion,
16801680

16811681
// Expensively check which certificate matches the client hello.
16821682
for _, cert := range certs {
1683-
16841683
if err := hi.SupportsCertificate(&cert); err == nil {
16851684
return &cert, nil
16861685
}

cli/server_internal_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ func Test_configureCipherSuites(t *testing.T) {
173173
},
174174
}
175175
for _, tt := range tests {
176-
177176
t.Run(tt.name, func(t *testing.T) {
178177
t.Parallel()
179178
ctx := context.Background()
@@ -245,7 +244,6 @@ func TestRedirectHTTPToHTTPSDeprecation(t *testing.T) {
245244
}
246245

247246
for _, tc := range testcases {
248-
249247
t.Run(tc.name, func(t *testing.T) {
250248
t.Parallel()
251249
ctx := testutil.Context(t, testutil.WaitShort)
@@ -310,7 +308,6 @@ func TestIsDERPPath(t *testing.T) {
310308
},
311309
}
312310
for _, tc := range testcases {
313-
314311
t.Run(tc.path, func(t *testing.T) {
315312
t.Parallel()
316313
require.Equal(t, tc.expected, isDERPPath(tc.path))
@@ -363,7 +360,6 @@ func TestEscapePostgresURLUserInfo(t *testing.T) {
363360
},
364361
}
365362
for _, tc := range testcases {
366-
367363
t.Run(tc.input, func(t *testing.T) {
368364
t.Parallel()
369365
o, err := escapePostgresURLUserInfo(tc.input)

0 commit comments

Comments
 (0)