is not staticcheck/golangci-lint clean #4

Open
opened 2026-04-09 04:29:01 +00:00 by harivansh-afk · 0 comments

The repo currently passes go vet and go test -race, but it is not clean under the stricter static analysis pass we should expect for a public host daemon.

What I hit locally:

  • staticcheck ./... reports unused symbols:
    • hostVSockPath in internal/firecracker/launch.go:234
    • snapshotPaths and buildSnapshotPaths in internal/firecracker/paths.go:71-77
  • golangci-lint run ./... reports a larger errcheck and ineffassign set, including unchecked closes and removals plus an ineffectual assignment in waitForSocket.

Representative findings:

  • unchecked file, dir, and socket closes in main.go:63, internal/daemon/files.go, internal/daemon/snapshot.go, and internal/store/file_store.go
  • unchecked cleanup calls in internal/daemon/files.go:270, internal/daemon/files.go:309
  • ineffectual assignment in internal/firecracker/launch.go:164

Expected behavior:

  • The public host daemon repo should be clean under staticcheck and golangci-lint, with analyzer runs enforced in CI.

Suggested follow-up:

  • Remove dead code, fix the errcheck violations, and wire analyzer execution into the normal validation path for this repo.
The repo currently passes `go vet` and `go test -race`, but it is not clean under the stricter static analysis pass we should expect for a public host daemon. What I hit locally: - `staticcheck ./...` reports unused symbols: - `hostVSockPath` in `internal/firecracker/launch.go:234` - `snapshotPaths` and `buildSnapshotPaths` in `internal/firecracker/paths.go:71-77` - `golangci-lint run ./...` reports a larger errcheck and ineffassign set, including unchecked closes and removals plus an ineffectual assignment in `waitForSocket`. Representative findings: - unchecked file, dir, and socket closes in `main.go:63`, `internal/daemon/files.go`, `internal/daemon/snapshot.go`, and `internal/store/file_store.go` - unchecked cleanup calls in `internal/daemon/files.go:270`, `internal/daemon/files.go:309` - ineffectual assignment in `internal/firecracker/launch.go:164` Expected behavior: - The public host daemon repo should be clean under `staticcheck` and `golangci-lint`, with analyzer runs enforced in CI. Suggested follow-up: - Remove dead code, fix the errcheck violations, and wire analyzer execution into the normal validation path for this repo.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: getcompanion-ai/computer-host#4
No description provided.