Skip to content

fix: resolve all golangci-lint errors failing CI#27

Merged
xfiive merged 3 commits intodevfrom
fix/golangci-lint-errors
Mar 9, 2026
Merged

fix: resolve all golangci-lint errors failing CI#27
xfiive merged 3 commits intodevfrom
fix/golangci-lint-errors

Conversation

@xfiive
Copy link
Member

@xfiive xfiive commented Mar 9, 2026

Summary

  • Fix 35 lint errors across 23 files that caused CI failures on dev and feat/ci-feedback-loop branches
  • All errors were from the golangci-lint step (errcheck, unused, gosimple, staticcheck, ineffassign)
  • Net result: 41 insertions, 174 deletions — mostly dead code removal

Changes by category

errcheck — unchecked error returns (6 fixes)

  • internal/sqlexec/executor.gotx.Rollback wrapped in deferred closure with _ =
  • internal/updates/cache.goos.WriteFile best-effort, ignored with _ =
  • internal/updates/checker.goSaveNotificationData (2 occurrences)
  • internal/orchestration/auth_validator.gojson.Encode
  • internal/orchestration/event_handler.goPlanSpinner.Stop() (3 occurrences)

unused — dead code removal (10 fixes)

  • Removed unused functions: stringListToBulletItems, assertViewNotContains, showEndpointIndicators, isTUIOutputMode, startInlineSpinner
  • Removed unused struct fields: transitionOn/Target/Data, skippedCount, eventHandler, workerPool
  • Removed unused vars: errPromptCancelled, errPromptTimeout

gosimple — code simplifications (7 fixes)

  • Simplified nil+len check to just len() check
  • Used type conversions instead of struct literals (TableDoneMsg)
  • Used switch msg := msg.(type) to eliminate redundant type assertions
  • Replaced fmt.Sprintf("literal") with string literals

staticcheck (5 fixes)

  • Replaced nil context with context.TODO() in tests
  • Replaced deprecated grpc.DialContext + grpc.WithBlock with grpc.NewClient
  • Fixed unused variable assignments

ineffassign (1 fix)

  • Fixed ineffectual assignment in DSN parser

Test plan

  • go build ./... passes
  • go build -tags dev ./... passes
  • CI pipeline passes (golangci-lint, tests)

@xfiive xfiive self-assigned this Mar 9, 2026
@xfiive xfiive force-pushed the fix/golangci-lint-errors branch from 994f6cc to 1da98dd Compare March 9, 2026 15:32
@xfiive xfiive added ✨ Refactoring Refactoring request 🚀 CI/CD For CI/CD specialists 🛠️ Enhancement New feature or request labels Mar 9, 2026
@xfiive xfiive merged commit 4f45b57 into dev Mar 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 CI/CD For CI/CD specialists 🛠️ Enhancement New feature or request ✨ Refactoring Refactoring request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant