Skip to content

fix(lint): clear errcheck/gosec debt in status+interstitial code - #4059

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix/status-interstitial-lint
Aug 21, 2026
Merged

fix(lint): clear errcheck/gosec debt in status+interstitial code#4059
0pcom merged 1 commit into
skycoin:developfrom
0pcom:fix/status-interstitial-lint

Conversation

@0pcom

@0pcom 0pcom commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

golangci-lint 2.12.2 (the local/gate version) flags pre-existing issues in the status/interstitial code that merged via #4050/#4053/#4054 — CI's lint was laxer, so make check is currently RED on develop. This clears them. No behavior change.

Ran golangci-lint run -c .golangci.yml ./pkg/visor/ ./pkg/proxystatus/ ./pkg/dmsgweb/ ./pkg/skynetweb/ ./pkg/proxyinterstitial/0 issues after these fixes:

  • embedded_proxystatus.go (errcheck, check-blank): check ProcByName's returns (proc, ok := …; Running = ok && proc != nil) instead of blanking.
  • routeviz_embed.go (errcheck): handle the w.Write error (debug-log via hv.log(r)).
  • proxystatus/render.go (gosec G115): keep the per-leg sent-share as uint64 and print it directly with %d — no uint64 → int narrowing to overflow-check.
  • meshproxy.go (gosec G705): justify the status-page w.Write with //nolint:gosecproxystatus.Render emits trusted, server-generated HTML that HTML-escapes every interpolated value (not tainted input).
  • stream_test.go / proxystatus_test.go (errcheck): check the Write / ParseInt returns.

Verified make check (TMPDIR=/var/tmp) — reporting the result in the thread. Unblocks the merge chain.

…e check green)

golangci-lint 2.12.2 (errcheck check-blank:true, gosec G115/G705) flagged
pre-existing issues in the merged status/interstitial code that CI's laxer
lint let through, leaving `make check` RED on develop. No behavior change.

- embedded_proxystatus.go: check ProcByName's returns instead of blanking.
- routeviz_embed.go: handle the w.Write error (debug-log it).
- proxystatus/render.go: keep the sent-share as uint64 and print it directly
  (no uint64->int narrowing) — clears gosec G115.
- meshproxy.go: justify the status-page w.Write with //nolint:gosec (G705) —
  proxystatus.Render emits trusted server HTML that escapes all values.
- stream_test.go / proxystatus_test.go: check the Write / ParseInt errors.
@0pcom
0pcom merged commit c190075 into skycoin:develop Aug 21, 2026
12 of 15 checks passed
@0pcom
0pcom deleted the fix/status-interstitial-lint branch August 24, 2026 23:46
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