Skip to content

fix(lint): clear develop golangci-lint debt - #4237

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix-lint-debt-develop
Aug 26, 2026
Merged

fix(lint): clear develop golangci-lint debt#4237
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix-lint-debt-develop

Conversation

@0pcom

@0pcom 0pcom commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Clears the remaining golangci-lint findings on develop so CI lint goes green: errcheck, gosec (G404), misspell, staticcheck (SA1019/SA4006/SA4023), unparam, and ineffassign.

Notable fixes:

  • errcheck: check the errors from pk.Set/srv.Set in a disc test (check-blank enabled).
  • gosec G404: justified //nolint:gosec on non-crypto shuffles used for peer/service/collection ordering (load distribution, not security-sensitive).
  • misspell: marshalled -> marshaled in CXO-publisher comments.
  • staticcheck SA1019: http.Transport.Dial -> DialContext via proxy.ContextDialer; drop the deprecated no-op svcmode.Config.DisableDHT field.
  • staticcheck SA4023: remove always-true err != nil comparisons on functions that only ever return a non-nil error (blocking Serve/accept loops, the ensureLoginChain stub).
  • staticcheck SA4006: check the previously-discarded entry.String() error; drop a dead j--.
  • unparam: drop the always-nil error return from encodeServicesBatch/encodeClientsBatch and update all callers; justified //nolint:unparam on a test closure whose signature is required by registry.IterateFunc.

Verified: golangci-lint run ./... reports 0 issues, go build . succeeds, and go test passes for every package whose non-test code changed.

Developed with AI assistance (Claude).

@0pcom
0pcom merged commit 009eb6e into skycoin:develop Aug 26, 2026
13 of 17 checks passed
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