Skip to content

Conversation

@marcus
Copy link
Owner

@marcus marcus commented Feb 10, 2026

Summary

Fixed all linting errors reported by golangci-lint across 3 files:

  • 8 errcheck violations (unchecked fmt.Fprintf/Fprintln and os.Setenv calls, w.Close in tests)
  • 1 staticcheck violation (unnecessary embedded field selector in Duration.MarshalJSON)

Changes

run.go (9 fixes):

  • displayPreflight: Assign all fmt.Fprintf and fmt.Fprintln error returns to _ (these are safe expected operations writing to stdout)
  • ensurePATH: Assign os.Setenv error to _

run_test.go (4 fixes):

  • TestConfirmRun_TTYAcceptsY, TTYAcceptsYes, TTYDefaultRejectsEmpty: Assign w.Close() error to _ in pipe cleanup
  • captureStdout helper: Assign w.Close() error to _

stats.go (1 fix):

  • MarshalJSON: Remove redundant embedded field selector (d.Duration.Seconds → d.Seconds)

Testing

  • All unit tests pass
  • golangci-lint reports no errcheck or staticcheck violations

🤖 Generated with Claude Code

- Fix 8 errcheck violations in run.go:
  - displayPreflight: assign fmt.Fprintf/Fprintln errors to _ (lines 475-530)
  - ensurePATH: assign os.Setenv error to _ (line 918)
- Fix 4 errcheck violations in run_test.go:
  - TestConfirmRun_TTYAcceptsY: assign w.Close error to _ (line 864)
  - TestConfirmRun_TTYAcceptsYes: assign w.Close error to _ (line 886)
  - TestConfirmRun_TTYDefaultRejectsEmpty: assign w.Close error to _ (line 930)
  - captureStdout: assign w.Close error to _ (line 956)
- Fix 1 staticcheck QF1008 violation in stats.go:
  - MarshalJSON: use d.Seconds() directly instead of d.Duration.Seconds() (line 31)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@marcus marcus merged commit 2f811f6 into main Feb 11, 2026
2 checks passed
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.

1 participant