Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

Fixed staticcheck linting violations in artifact manager test utilities.

Changes

  • QF1012: Replaced 13 instances of sb.WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&sb, ...) for more efficient string building
  • S1009: Removed redundant nil check before len() call on map (len of nil map is defined as 0)

All changes were in pkg/workflow/artifact_manager_workflows_test.go helper functions that generate markdown summaries.

// Before
sb.WriteString(fmt.Sprintf("### Job: `%s`\n\n", jobName))

// After
fmt.Fprintf(&sb, "### Job: `%s`\n\n", jobName)

This eliminates unnecessary string allocations while maintaining identical output.

Original prompt

Lint go


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add linting for Go code Fix Go linting issues: replace WriteString(fmt.Sprintf) with fmt.Fprintf Jan 4, 2026
Copilot AI requested a review from pelikhan January 4, 2026 16:12
@pelikhan pelikhan marked this pull request as ready for review January 4, 2026 16:12
@pelikhan pelikhan merged commit d2f5eaf into main Jan 4, 2026
4 checks passed
@pelikhan pelikhan deleted the copilot/lint-go-code-again branch January 4, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants