fix(session): use fmt.Fprintf with nolint to satisfy both staticcheck and errcheck
Some checks failed
CI / Lint / Test / Vet (push) Successful in 1m7s
CI / Mirror to GitHub (push) Failing after 3s

This commit is contained in:
Mathias Bergqvist
2026-04-19 18:56:12 +02:00
parent 738275252c
commit 509c04b6e4

View File

@@ -23,14 +23,14 @@ func FormatHistory(entries []Entry, excludePhase string) string {
var b strings.Builder var b strings.Builder
b.WriteString("## Session history\n\n") b.WriteString("## Session history\n\n")
for _, e := range filtered { for _, e := range filtered {
b.WriteString(fmt.Sprintf("### Phase: %s\n", e.Phase)) fmt.Fprintf(&b, "### Phase: %s\n", e.Phase) //nolint:errcheck // strings.Builder never errors
b.WriteString(fmt.Sprintf("- Skill: %s\n", e.Skill)) fmt.Fprintf(&b, "- Skill: %s\n", e.Skill) //nolint:errcheck
b.WriteString(fmt.Sprintf("- Status: %s\n", e.FinalStatus)) fmt.Fprintf(&b, "- Status: %s\n", e.FinalStatus) //nolint:errcheck
if e.FilePath != "" { if e.FilePath != "" {
b.WriteString(fmt.Sprintf("- File: %s\n", e.FilePath)) fmt.Fprintf(&b, "- File: %s\n", e.FilePath) //nolint:errcheck
} }
if e.Message != "" { if e.Message != "" {
b.WriteString(fmt.Sprintf("- Summary: %s\n", e.Message)) fmt.Fprintf(&b, "- Summary: %s\n", e.Message) //nolint:errcheck
} }
b.WriteString("\n") b.WriteString("\n")
} }