Skip to content

Commit ee7e8f0

Browse files
committed
More linter fixes
1 parent 25ebcca commit ee7e8f0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pkg/github/repository_resource_completions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func RepositoryResourceCompletionHandler(getClient GetClientFn) func(ctx context
7171

7272
// --- Per-argument resolver functions ---
7373

74-
func completeOwner(ctx context.Context, client *github.Client, resolved map[string]string, argValue string) ([]string, error) {
74+
func completeOwner(ctx context.Context, client *github.Client, _ map[string]string, argValue string) ([]string, error) {
7575
var values []string
7676
user, _, err := client.Users.Get(ctx, "")
7777
if err == nil && user.GetLogin() != "" {

pkg/github/repository_resource_completions_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestRepositoryResourceCompletionHandler(t *testing.T) {
6464

6565
for _, tt := range tests {
6666
t.Run(tt.name, func(t *testing.T) {
67-
getClient := func(ctx context.Context) (*github.Client, error) {
67+
getClient := func(_ context.Context) (*github.Client, error) {
6868
return &github.Client{}, nil
6969
}
7070

@@ -254,7 +254,7 @@ func TestRepositoryResourceCompletionHandler_MaxResults(t *testing.T) {
254254

255255
// Mock a resolver that returns more than 100 results
256256
originalResolver := RepositoryResourceArgumentResolvers["owner"]
257-
RepositoryResourceArgumentResolvers["owner"] = func(ctx context.Context, client *github.Client, resolved map[string]string, argValue string) ([]string, error) {
257+
RepositoryResourceArgumentResolvers["owner"] = func(_ context.Context, _ *github.Client, _ map[string]string, _ string) ([]string, error) {
258258
// Return 150 results
259259
results := make([]string, 150)
260260
for i := 0; i < 150; i++ {
@@ -291,15 +291,15 @@ func TestRepositoryResourceCompletionHandler_MaxResults(t *testing.T) {
291291

292292
func TestRepositoryResourceCompletionHandler_WithContext(t *testing.T) {
293293
// Test that the handler properly passes resolved context arguments
294-
getClient := func(ctx context.Context) (*github.Client, error) {
294+
getClient := func(_ context.Context) (*github.Client, error) {
295295
return &github.Client{}, nil
296296
}
297297

298298
handler := RepositoryResourceCompletionHandler(getClient)
299299

300300
// Mock a resolver that just returns the resolved arguments for testing
301301
originalResolver := RepositoryResourceArgumentResolvers["repo"]
302-
RepositoryResourceArgumentResolvers["repo"] = func(ctx context.Context, client *github.Client, resolved map[string]string, argValue string) ([]string, error) {
302+
RepositoryResourceArgumentResolvers["repo"] = func(_ context.Context, _ *github.Client, resolved map[string]string, _ string) ([]string, error) {
303303
if owner, exists := resolved["owner"]; exists {
304304
return []string{fmt.Sprintf("repo-for-%s", owner)}, nil
305305
}
@@ -334,15 +334,15 @@ func TestRepositoryResourceCompletionHandler_WithContext(t *testing.T) {
334334

335335
func TestRepositoryResourceCompletionHandler_NilContext(t *testing.T) {
336336
// Test that the handler handles nil context gracefully
337-
getClient := func(ctx context.Context) (*github.Client, error) {
337+
getClient := func(_ context.Context) (*github.Client, error) {
338338
return &github.Client{}, nil
339339
}
340340

341341
handler := RepositoryResourceCompletionHandler(getClient)
342342

343343
// Mock a resolver that checks for empty resolved map
344344
originalResolver := RepositoryResourceArgumentResolvers["repo"]
345-
RepositoryResourceArgumentResolvers["repo"] = func(ctx context.Context, client *github.Client, resolved map[string]string, argValue string) ([]string, error) {
345+
RepositoryResourceArgumentResolvers["repo"] = func(_ context.Context, _ *github.Client, resolved map[string]string, _ string) ([]string, error) {
346346
assert.NotNil(t, resolved, "Resolved map should never be nil")
347347
return []string{"test-repo"}, nil
348348
}

0 commit comments

Comments
 (0)