Skip to content

ci: expand golangci-lint with bodyclose and errorlint#33

Merged
fmenesesg merged 1 commit into
mainfrom
ci/expand-golangci-lint
Jun 11, 2026
Merged

ci: expand golangci-lint with bodyclose and errorlint#33
fmenesesg merged 1 commit into
mainfrom
ci/expand-golangci-lint

Conversation

@fmenesesg

Copy link
Copy Markdown
Collaborator

Proposed change

Extend static analysis per architecture review E3: enable bodyclose and errorlint in .golangci.yml. Fix two errorlint findings in the admin HTTP client (%v%w).

Revive intentionally omitted — high initial noise; can revisit later.

Type of change

  • Tests / CI

RHCL checklist

  • Tests added or updated (go test ./... or mvn test / npm test)
  • CI does not introduce -DskipTests without justification
  • No secrets in diff (tokens, kubeconfigs, OIDC secrets)
  • rhcl-ai docs updated if export/import contract changes
  • PR description and docs in English
  • Tested in local lab if applicable (seed → export → analyze)

Test plan

  • golangci-lint run ./... — clean
  • go test ./... — 122 tests pass

Changes

File Change
.golangci.yml Enable bodyclose, errorlint + settings
internal/admin/client.go Wrap retry errors with %w

Closes #32

Made with Cursor

Extend lint coverage for HTTP body leaks and error wrapping.
Fix admin client retry errors to use %w for lastErr.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fmenesesg fmenesesg requested a review from pcastelo as a code owner June 11, 2026 20:47
@fmenesesg fmenesesg added area/ci Pipelines CI/CD type:tests-ci Tests, CI/CD, or workflow changes labels Jun 11, 2026
@fmenesesg fmenesesg merged commit 3f6cde1 into main Jun 11, 2026
1 check passed
@fmenesesg fmenesesg deleted the ci/expand-golangci-lint branch June 11, 2026 20:50
fmenesesg added a commit that referenced this pull request Jun 11, 2026
ci: expand golangci-lint with bodyclose and errorlint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Pipelines CI/CD type:tests-ci Tests, CI/CD, or workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Expand golangci-lint with bodyclose and errorlint

1 participant