CI: gofmt/lint/tidy/vulncheck gates, enable -race - #34
Merged
Conversation
Purely mechanical -- no behavior change. Needed before adding a gofmt CI gate, since these files predate it and had drifted.
…k/unused) 178 pre-existing errcheck findings (mostly best-effort Close()/Flush()/ Fprint*/WriteMessage/MarkFlag* calls whose error was never actionable), 15 staticcheck quick-fixes (embedded-field selector simplification, De Morgan's, Fprintf-over-WriteString+Sprintf, an empty branch), and 3 unused findings -- all found ahead of adding CI gates for them. A few needed real judgment rather than blind suppression, since they're this codebase's own persistence/lifecycle calls rather than stdlib boilerplate: - client/recovery.go's deleteMeta/saveMeta/metaDB.View calls now log on failure instead of silently dropping it, matching this file's existing log.Error()/log.Warn() convention -- a lost delete/save here means a retry-recovery entry silently goes stale or never converges. - cli/bunker/policy.go's two saveLocked() calls (resolveGrantLocked, Prune) are left as best-effort with an explanatory comment: in-memory grant state is already updated and authoritative, and this package has no logger dependency anywhere else to introduce just for these two sites. - cli/bunker/command.go's `go daemon.Run(ctx)` now logs via the daemon's own d.log() if Run returns (currently only reachable via "no relays configured", silently dropped before -- the bunker command would just hang with zero explanation). - client/client.go's Ctrl+S save callback now surfaces a failure via c.app.Error(), matching the sibling callback right above it that already does this for a different error. Its TUI's app.Run() (and client/ping.go's) now logs via the existing zerolog logger instead of discarding a real startup/render failure. cli/relay/service.go also drops a dead, comment-explained no-op branch for config.HandshakeTimeout: it's parsed but was never wired to anything (relay.SessionConfig has no such field) -- actually wiring it up would be a real behavior change belonging in its own PR, not this cleanup.
check gains Gofmt/Build/Tidy steps alongside the existing Vet/Test; two new jobs, lint (golangci-lint v2.13) and vulncheck (govulncheck), run in parallel. All four pass clean against the current tree as of the prior lint-cleanup commit.
naliyi
marked this pull request as ready for review
September 4, 2026 09:20
naliyi
added a commit
that referenced
this pull request
Sep 4, 2026
Merge CI gates work (PR #34) into main
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
Stacked on #33 (needed for its go1.26.8 bump -- without it, govulncheck fails on the current go1.26.1 directive's stdlib CVEs). Retarget to
mainonce #33 merges.nmilat's own CI structure (ohstr/nmilat, added in its PR docs: note (#N) is plain text in CHANGELOG.md, links only in the release #7):checkgains Gofmt/Build/Tidy steps alongside the existing Vet/Test;lint(golangci-lint v2.13) andvulncheck(govulncheck) run as separate parallel jobs.client/recovery.go,cli/bunker/policy.go,cli/bunker/command.go'sdaemon.Run,client/client.go/client/ping.go'sapp.Run) versus the rest (best-effort Close/Flush/Fprint*/MarkFlag* boilerplate).Test plan
gofmt -l .cleango build ./...go vet ./...go mod tidy-- no diffgo test -short -race ./...-- all packages greengolangci-lint run ./... --max-issues-per-linter=0 --max-same-issues=0-- 0 issuesgovulncheck ./...-- 0 vulnerabilities affecting this code