From 9eab1ba11efd7caade2e0c1c66a4c4b67d32026e Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Mon, 30 Jun 2025 14:13:08 +0200 Subject: [PATCH] fix: resolve golangci-lint issues - Fix gofumpt formatting in models.go - Replace deprecated database methods with context-aware versions: - db.Ping() -> db.PingContext() - db.Exec() -> db.ExecContext() - db.Begin() -> db.BeginTx() - Update Taskfile.yaml to match CI lint configuration --- Taskfile.yaml | 4 ++-- internal/tui/components/dialogs/models/models.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 9453eb363513d5b9e0987a637d761eef1bfe63c3..077c994ea7c6ce79fabbc18f76cfb3ef27af8d5e 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -6,12 +6,12 @@ tasks: lint: desc: Run base linters cmds: - - golangci-lint run + - golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m lint-fix: desc: Run base linters and fix issues cmds: - - golangci-lint run --fix + - golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m --fix test: desc: Run tests diff --git a/internal/tui/components/dialogs/models/models.go b/internal/tui/components/dialogs/models/models.go index 8e81777d7e3e6c45628cb8839b52c484e47f5640..c2c65e5d90c1d9bf9bfca708692f0f288c27a594 100644 --- a/internal/tui/components/dialogs/models/models.go +++ b/internal/tui/components/dialogs/models/models.go @@ -219,7 +219,7 @@ func (m *modelDialogCmp) SetModelType(modelType int) tea.Cmd { providers := config.Providers() modelItems := []util.Model{} selectIndex := 0 - + cfg := config.Get() var currentModel config.PreferredModel if m.modelType == LargeModelType { @@ -227,7 +227,7 @@ func (m *modelDialogCmp) SetModelType(modelType int) tea.Cmd { } else { currentModel = cfg.Models.Small } - + for _, provider := range providers { name := provider.Name if name == "" {