From c0526f244e04ef92bae20f4e2fd5b90a1edfae32 Mon Sep 17 00:00:00 2001 From: Daniel Sauer <81422812+sauerdaniel@users.noreply.github.com> Date: Tue, 13 Jan 2026 22:16:44 +0100 Subject: [PATCH] fix(lint): remove unused error return from buildCVSummary (#466) buildCVSummary always returned nil for its error value, causing golangci-lint to fail with "result 1 (error) is always nil". The function handles errors internally by returning partial data, so the error return was misleading. Removed it and updated caller. --- internal/cmd/polecat_identity.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/internal/cmd/polecat_identity.go b/internal/cmd/polecat_identity.go index 5e98a798..5a17beda 100644 --- a/internal/cmd/polecat_identity.go +++ b/internal/cmd/polecat_identity.go @@ -407,11 +407,7 @@ func runPolecatIdentityShow(cmd *cobra.Command, args []string) error { sessionRunning, _ := polecatMgr.IsRunning(polecatName) // Build CV summary with enhanced analytics - cv, err := buildCVSummary(r.Path, rigName, polecatName, beadID, clonePath) - if err != nil { - // Continue without CV if there's an error - cv = &CVSummary{Identity: beadID} - } + cv := buildCVSummary(r.Path, rigName, polecatName, beadID, clonePath) // JSON output - include both identity details and CV if polecatIdentityShowJSON { @@ -707,7 +703,8 @@ func runPolecatIdentityRemove(cmd *cobra.Command, args []string) error { } // buildCVSummary constructs the CV summary for a polecat. -func buildCVSummary(rigPath, rigName, polecatName, identityBeadID, clonePath string) (*CVSummary, error) { +// Returns a partial CV on errors rather than failing - CV data is best-effort. +func buildCVSummary(rigPath, rigName, polecatName, identityBeadID, clonePath string) *CVSummary { cv := &CVSummary{ Identity: identityBeadID, Languages: make(map[string]int), @@ -787,7 +784,7 @@ func buildCVSummary(rigPath, rigName, polecatName, identityBeadID, clonePath str cv.FirstPassRate = float64(cv.IssuesCompleted) / float64(total) } - return cv, nil + return cv } // IssueInfo holds basic issue information for CV queries.