Skip to content

chore(ci): introduce golangci-lint and resolve findings#16

Merged
osamingo merged 2 commits intomainfrom
chore/introduce-golangci-lint
Feb 16, 2026
Merged

chore(ci): introduce golangci-lint and resolve findings#16
osamingo merged 2 commits intomainfrom
chore/introduce-golangci-lint

Conversation

@osamingo
Copy link
Owner

Summary

  • Replace custom csvppvet and standalone gofumpt check with golangci-lint v2 and gostyle-action in the CI lint job
  • Add .golangci.yml configuration with standard linters plus gosec, bidichk, errorlint, bodyclose, unconvert, usestdlibvars, modernize, and exhaustive
  • Resolve all 22 golangci-lint findings across the codebase

Changes

CI / Tooling

  • Add golangci-lint v2.9.0 as a Go tool
  • Add gostyle as a Go tool
  • Add golangci-lint-action v9.2.0 and gostyle-action v1.5.1 to CI lint job
  • Remove csvppvet custom vet tool and gofumpt tool directive
  • Remove standalone gofumpt check and go vet steps (now covered by golangci-lint)

Lint Fixes

  • Use errors.Is instead of == / != for error comparison (errorlint)
  • Add proper error handling for defer Close calls (errcheck)
  • Suppress errcheck for stdout writes and type cache assertions
  • Add default case to tea.KeyType switch (exhaustive)
  • Suppress unused warnings for deprecated API and cobra handler signature
  • Fix goimports ordering and use strings.Cut for modernization

Test plan

  • go test -race ./... passes
  • go tool golangci-lint run ./... reports 0 issues

🤖 Generated with Claude Code

osamingo and others added 2 commits February 16, 2026 16:52
- Add golangci-lint v2 as a Go tool and configure .golangci.yml
- Add golangci-lint-action and gostyle-action to CI lint job
- Remove csvppvet custom vet tool and gofumpt tool directive
- Remove gofumpt check and go vet steps from CI (covered by golangci-lint)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use errors.Is instead of == / != for error comparison (errorlint)
- Add proper error handling for defer Close calls (errcheck)
- Suppress errcheck for stdout writes and type cache assertions
- Add default case to tea.KeyType switch (exhaustive)
- Suppress unused warnings for deprecated API and cobra handler signature
- Fix goimports ordering and use strings.Cut for modernization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@osamingo osamingo self-assigned this Feb 16, 2026
@osamingo osamingo marked this pull request as ready for review February 16, 2026 07:58
@osamingo osamingo merged commit 3e5dae3 into main Feb 16, 2026
2 checks passed
@osamingo osamingo deleted the chore/introduce-golangci-lint branch February 16, 2026 07:59
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