fix(session): use fmt.Fprintf with nolint to satisfy both staticcheck and errcheck
This commit is contained in:
@@ -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")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user