fix: Resolve 11 errcheck linter violations to unblock CI (bd-91)

Fixed all unchecked error returns in production code:
- os.Remove() calls in cleanup paths
- cmd.Wait() in goroutines
- fmt.Fprintf() writes
- Type assertions with proper ok checks

Reduces linter issues from 99 to 88. CI should now pass linting.
This commit is contained in:
Steve Yegge
2025-10-24 11:59:11 -07:00
parent 7229b6d68f
commit c59db1a798
9 changed files with 65 additions and 54 deletions

View File

@@ -294,35 +294,43 @@ func updateMergeTextReferences(ctx context.Context, sourceIDs []string, targetID
// Update description
if issue.Description != "" && re.MatchString(issue.Description) {
if _, exists := updates["description"]; !exists {
updates["description"] = issue.Description
}
updates["description"] = re.ReplaceAllString(updates["description"].(string), replacementText)
if _, exists := updates["description"]; !exists {
updates["description"] = issue.Description
}
if desc, ok := updates["description"].(string); ok {
updates["description"] = re.ReplaceAllString(desc, replacementText)
}
}
// Update notes
if issue.Notes != "" && re.MatchString(issue.Notes) {
if _, exists := updates["notes"]; !exists {
updates["notes"] = issue.Notes
}
updates["notes"] = re.ReplaceAllString(updates["notes"].(string), replacementText)
if _, exists := updates["notes"]; !exists {
updates["notes"] = issue.Notes
}
if notes, ok := updates["notes"].(string); ok {
updates["notes"] = re.ReplaceAllString(notes, replacementText)
}
}
// Update design
if issue.Design != "" && re.MatchString(issue.Design) {
if _, exists := updates["design"]; !exists {
updates["design"] = issue.Design
}
updates["design"] = re.ReplaceAllString(updates["design"].(string), replacementText)
if _, exists := updates["design"]; !exists {
updates["design"] = issue.Design
}
if design, ok := updates["design"].(string); ok {
updates["design"] = re.ReplaceAllString(design, replacementText)
}
}
// Update acceptance criteria
if issue.AcceptanceCriteria != "" && re.MatchString(issue.AcceptanceCriteria) {
if _, exists := updates["acceptance_criteria"]; !exists {
updates["acceptance_criteria"] = issue.AcceptanceCriteria
}
updates["acceptance_criteria"] = re.ReplaceAllString(updates["acceptance_criteria"].(string), replacementText)
if _, exists := updates["acceptance_criteria"]; !exists {
updates["acceptance_criteria"] = issue.AcceptanceCriteria
}
if ac, ok := updates["acceptance_criteria"].(string); ok {
updates["acceptance_criteria"] = re.ReplaceAllString(ac, replacementText)
}
}
}
// Apply updates if any