Files
devvm/docs
w3cjandClaude Opus 5.5 548113d726 build(lint): enforce contexts, nolint reasons, reassign and function size
.golangci.yml:
- forbidigo bans context.Background and context.TODO outside internal/ui
  and cmd/devvm.
- nolintlint requires each //nolint to name its linters and say why, and
  reports unused ones.
- reassign (patterns .*) forbids setting another package's variables,
  tests included.
- revive keeps its default rules and adds function-length (100
  statements, 160 lines) and cognitive-complexity (75).

Fixes:
- Backend.Lifeline takes a ctx: smolvm's machine data-dir lookup runs
  with the caller's.
- The proxy's TLS handshake with a VM uses the request's context, limited
  to 30 seconds.
- OAuth token refreshes run within refreshTimeout (30 seconds).
- Tests use t.Context().
- Launch.create is split into plan, newVM.record and undoCreate.
- lima's TestStartConfined is split into helpers.
- smolvm's Terminal comes from its UI's StdinIsTerminal.
- Unused //nolint directives are removed.
- Fresh contexts that remain (an in-memory TLS parse, lookups shared by
  every request, a test cleanup) each carry a nolint saying why.

Docs: contributing.md lists which lint rule enforces which convention;
AGENTS.md names the linters behind its Go conventions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 18:43:14 -06:00
..