fix: resolve golangci-lint errors

- Add error check for fmt.Fprintf in tips.go (errcheck)
- Add nolint for safe SQL formatting in transaction.go (gosec G201)
- Fix 'cancelled' -> 'canceled' spelling (misspell)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-24 22:21:55 -08:00
parent 9767e57024
commit 071fc96206
3 changed files with 4 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ func (s *SQLiteStorage) RunInTransaction(ctx context.Context, fn func(tx storage
committed := false
defer func() {
if !committed {
// Use background context to ensure rollback completes even if ctx is cancelled
// Use background context to ensure rollback completes even if ctx is canceled
_, _ = conn.ExecContext(context.Background(), "ROLLBACK")
}
}()
@@ -1123,6 +1123,7 @@ func (t *sqliteTxStorage) getLabelsForIssues(ctx context.Context, issueIDs []str
args[i] = id
}
// nolint:gosec // G201: placeholders is only "?" characters, not user input
query := fmt.Sprintf(`
SELECT issue_id, label FROM labels
WHERE issue_id IN (%s)