chore: fix 3 pre-existing golangci-lint failures on main#71
Merged
Conversation
Prior cleanup (mitto-7r0) was closed but the failures returned:
1. internal/acpproc/acp_process_memory.go:49 (unused)
Delete descendantsRSS — dead wrapper around descendantsRSSDetailed with
no callers anywhere in the tree.
2. internal/web/handlers/dashboard.go:266 (unused)
Delete itemType — no callers; the sibling item* helpers (itemStatus,
itemUpdatedAt, itemPriority) are used, but nothing reads issue_type
via this helper.
3. internal/web/loop_runner_test.go:4019 (staticcheck SA4000)
The test literally called
workspaceKey("/w", "a") != workspaceKey("/w", "a")
which is a tautology. Assign both to variables first so we're
comparing two independent invocations of the helper (the actual
intent: verify workspaceKey is deterministic for identical inputs).
All three appear in run 29413245700 (main) and 29568780468 (PR #70)
with identical output.
There was a problem hiding this comment.
Pull request overview
This PR restores golangci-lint cleanliness on main by removing two unused helper functions and fixing a staticcheck tautology in a test, preventing CI failures from cascading into unrelated PRs.
Changes:
- Remove unused
descendantsRSSwrapper in ACP process memory accounting (internal/acpproc). - Remove unused
itemTypehelper from dashboard handler utilities (internal/web/handlers). - Fix
staticcheckSA4000 inTestLoopRunner_WorkspaceKeyby comparing two independent calls.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/acpproc/acp_process_memory.go | Deletes an unused wrapper (descendantsRSS) with no callers to satisfy unused lint. |
| internal/web/handlers/dashboard.go | Removes an unused dashboard helper (itemType) with no callers to satisfy unused lint. |
| internal/web/loop_runner_test.go | Updates a deterministic-key test to avoid SA4000 tautology while preserving intent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…/exhaustive-deps rule
The preact/hooks/exhaustive-deps plugin is not installed in this repo's
ESLint config, so the disable-comment produces a hard error:
Definition for rule 'preact/hooks/exhaustive-deps' was not found
This surfaced in CI once the Go lint issues fixed by this PR stopped
short-circuiting the Lint job. The useEffect at that call site
intentionally uses an empty deps array; no rule suppression is needed.
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
maincurrently failsgolangci-lintwith 3 issues, which also cascade into every open PR (verified: run 29413245700 onmain, run 29568780468 on PR #70 — identical errors). Prior cleanup beadmitto-7r0was closed but the failures came back.Fixes
1.
internal/acpproc/acp_process_memory.go:49—unused: descendantsRSSDeleted. It was a thin wrapper that discarded the count return of
descendantsRSSDetailed; agit grepconfirms zero callers anywhere in the tree.2.
internal/web/handlers/dashboard.go:266—unused: itemTypeDeleted. Sibling helpers (
itemStatus,itemUpdatedAt,itemPriority) are used, but nothing readsissue_typethrough this helper. No callers.3.
internal/web/loop_runner_test.go:4019—staticcheck SA4000The test literally did:
which is a tautology (SA4000 correctly flags it). Fixed by assigning both invocations to variables so the comparison is between two independent calls — preserving the actual intent (verify
workspaceKeyis deterministic for identical inputs).Local gate
Ran on top of
origin/main:make fmt-check— cleango build ./...— cleango vet ./...— cleangolangci-lint run --timeout=5m— 0 issuesgo test ./internal/acpproc/... ./internal/web/... ./internal/web/handlers/...— all passRelated
mitto-7r0feat/unsorted-improvs) — this is an independent cleanup somainand every PR CI go green again.