From 3ea11bc5d671d962d01b57fa0fba0bda611025fe Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 23 Mar 2026 08:27:18 +0200 Subject: fix: code quality improvements across lsp, askcli, appconfig, integrationtests - lsp/handlers_completion.go: track collectFirstCompletion goroutine in inflight WaitGroup (goroutine leak fix) - lsp/transport.go: use %w instead of %v for error wrapping - askcli/command_list.go: extract handleListWithFilters shared helper; handleList/handleAll/handleReady are now single-liners - askcli/command_list.go, urgency.go, dep.go: log ParseTaskExport errors to stderr instead of returning 1 silently - appconfig/config_load.go: rename 'any' variable to 'found' to avoid shadowing the built-in identifier - llm/provider.go: add explanatory comment for package-level registry - integrationtests/ask_test.go: add //go:build integration tag; move repoRoot init from init() to TestMain with diagnostic error message Co-Authored-By: Claude Sonnet 4.6 --- internal/appconfig/config_load.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/appconfig') diff --git a/internal/appconfig/config_load.go b/internal/appconfig/config_load.go index 99461ca..cb02a2e 100644 --- a/internal/appconfig/config_load.go +++ b/internal/appconfig/config_load.go @@ -570,7 +570,7 @@ func parseSurfaceModels(raw map[string]any, logger *log.Logger) *App { *dest = append(*dest, entries...) return true } - any := appendEntries(&out.CompletionConfigs, "models.completion", table["completion"]) + found := appendEntries(&out.CompletionConfigs, "models.completion", table["completion"]) if ok := appendEntries(&out.CodeActionConfigs, "models.code_action", table["code_action"]); ok { if len(out.CodeActionConfigs) > 1 { if logger != nil { @@ -578,11 +578,11 @@ func parseSurfaceModels(raw map[string]any, logger *log.Logger) *App { } out.CodeActionConfigs = out.CodeActionConfigs[:1] } - any = true + found = true } - any = appendEntries(&out.ChatConfigs, "models.chat", table["chat"]) || any - any = appendEntries(&out.CLIConfigs, "models.cli", table["cli"]) || any - if !any { + found = appendEntries(&out.ChatConfigs, "models.chat", table["chat"]) || found + found = appendEntries(&out.CLIConfigs, "models.cli", table["cli"]) || found + if !found { return nil } return &out -- cgit v1.2.3