chore(ci): introduce golangci-lint and resolve findings#16
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
csvppvetand standalonegofumptcheck withgolangci-lintv2 andgostyle-actionin the CI lint job.golangci.ymlconfiguration with standard linters plusgosec,bidichk,errorlint,bodyclose,unconvert,usestdlibvars,modernize, andexhaustiveChanges
CI / Tooling
golangci-lintv2.9.0 as a Go toolgostyleas a Go toolgolangci-lint-actionv9.2.0 andgostyle-actionv1.5.1 to CI lint jobcsvppvetcustom vet tool andgofumpttool directivegofumptcheck andgo vetsteps (now covered by golangci-lint)Lint Fixes
errors.Isinstead of==/!=for error comparison (errorlint)defer Closecalls (errcheck)errcheckfor stdout writes and type cache assertionsdefaultcase totea.KeyTypeswitch (exhaustive)unusedwarnings for deprecated API and cobra handler signaturegoimportsordering and usestrings.Cutfor modernizationTest plan
go test -race ./...passesgo tool golangci-lint run ./...reports 0 issues🤖 Generated with Claude Code