Skip to content

fix: address lint issues across 24 files#69

Open
marcus wants to merge 1 commit intomainfrom
lint-fix
Open

fix: address lint issues across 24 files#69
marcus wants to merge 1 commit intomainfrom
lint-fix

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented Mar 23, 2026

Summary

  • errorlint: Use errors.Is for sentinel comparisons (io.EOF, scheduler.ErrNotRunning) and errors.As for type assertions (*exec.ExitError) across 6 files
  • perfsprint: Replace fmt.Sprintf("%d") with strconv.Itoa/FormatInt and fmt.Errorf (no verbs) with errors.New across 8 files
  • intrange: Use Go 1.22+ integer range syntax in budget.go and config.go
  • mirror: Replace bytes.HasPrefix([]byte,[]byte) with strings.HasPrefix in analysis/report.go; b.WriteString(string(x))b.Write(x) in report.go
  • gofumpt: Apply formatting fixes (octal literals, var grouping) in config.go and daemon.go
  • godot: Add trailing periods to block comments in init.go and install.go
  • wastedassign: Remove dead initial assignments in helpers.go and install.go
  • prealloc: Pre-allocate slices in github.go, td.go, register.go, audit.go, stats.go
  • forcetypeassert: Add checked type assertions in setup_test.go
  • errchkjson: Check json.Marshal errors in orchestrator_test.go

Skipped (intentional)

  • gosec G204/G404: Intentional subprocess execution and non-security random
  • nilerr in integrations/providers: Intentional fallback-on-error patterns
  • recvcheck on stats.Duration: Mixed receivers required by json.Marshaler/json.Unmarshaler interfaces

Test plan

  • go vet ./... passes
  • go build ./... passes
  • go test ./... passes (all 22 test packages)
  • Pre-commit hooks (gofmt, go vet, go build) pass

🤖 Generated with Claude Code


Automated by nightshift

Fix errorlint: use errors.Is for sentinel error comparisons (io.EOF,
scheduler.ErrNotRunning) and errors.As for type assertions (*exec.ExitError)
in provider-calibration, daemon, and all three agent packages.

Fix perfsprint: replace fmt.Sprintf("%d") with strconv.Itoa/FormatInt in
budget, report, status, task, provider tests, tmux, and provider-calibration.
Replace fmt.Errorf with errors.New where no format verbs are used.

Fix intrange: use Go 1.22+ integer range syntax in budget progressBar and
config struct iteration loops.

Fix mirror: replace bytes.HasPrefix([]byte(s), []byte(p)) with
strings.HasPrefix in analysis/report.go; replace b.WriteString(string(x))
with b.Write(x) in report.go.

Fix gofumpt: apply formatting (octal literals, var grouping) in config.go
and daemon.go.

Fix godot: add trailing periods to block comments in init.go and install.go.

Fix wastedassign: use var declaration instead of dead empty-string init in
helpers.go and install.go.

Fix prealloc: pre-allocate slices in github.go, td.go, register.go,
audit.go, and stats.go.

Fix forcetypeassert: add checked type assertions in setup_test.go.

Fix errchkjson: check json.Marshal errors in orchestrator_test.go.

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
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