Repository navigation
Description
🏷️ Go Function Rename Plan
Package Analyzed: pkg/linters/seenmapbool
Analysis Date: 2026-11-13
Round-Robin Position: package 89 of 154 real packages (testdata fixtures excluded)
Functions Analyzed: 8 functions across 1 file
Why This Matters
AI coding agents find functions by name. inspectBody says nothing about what the function does. It actually reports seen-map candidates, so an agent looking for that logic is unlikely to land on it. A name that states the job makes the function easier to find.
Rename Suggestions
pkg/linters/seenmapbool/seenmapbool.go
| Current Name | Suggested Name | Reason |
|---|---|---|
inspectBody() |
reportSeenMapBoolCandidates() |
inspect is a generic verb. The function collects local map[string]bool candidates in a function body, drops those assigned a non-true value, and reports the rest. The new name states that and uses the analyzer vocabulary. |
All functions in this file (for reference):
init(): ✅ Clear, no change needed (registers the hot-threshold flag)run(): ✅ Keep. It is the standard analysis pass name used by all 91 linter files inpkg/lintersinspectBody():⚠️ Rename suggested (see table above)collectSeenMapCandidates(): ✅ ClearfindNonSetMaps(): ✅ ClearmarkIfNonSetLiteral(): ✅ Descriptive, though longisMapStringBool(): ✅ ClearisBoolTrue(): ✅ Clear
Call-site check: Serena find_referencing_symbols and grep both show one caller, run in the same file. The package testdata does not reference it. Separate unexported inspectBody functions exist in pkg/linters/wgdonenotdeferred and pkg/linters/internal/resourcetracker. They are out of scope for this plan.
🤖 Agentic Implementation Plan
Agentic Implementation Plan
This is one rename in one file. Implement it as a single focused pull request.
Prerequisites
- Read
inspectBodyinpkg/linters/seenmapbool/seenmapbool.goand confirm it reports candidates - Confirm
reportSeenMapBoolCandidatesis not already declared inpkg/
Implementation Steps
1. Rename the function in pkg/linters/seenmapbool/seenmapbool.go
// Old
func inspectBody(pass *analysis.Pass, body *ast.BlockStmt, noLintIndex nolint.DirectiveIndex) {
// New
func reportSeenMapBoolCandidates(pass *analysis.Pass, body *ast.BlockStmt, noLintIndex nolint.DirectiveIndex) {Also update the doc comment that starts with // inspectBody walks and the single call in run.
2. Confirm no references remain
grep -rn "inspectBody" pkg/linters/seenmapbool/This should return nothing after the edit. Do not rename the inspectBody functions in wgdonenotdeferred or resourcetracker. They are separate functions.
3. Format, build, and test
make fmt
make build
make test-unit
make lintCommit Convention
refactor: rename inspectBody to reportSeenMapBoolCandidates for clarity
Validation Checklist
-
inspectBodyrenamed in the definition, the doc comment, and theruncall - No remaining
inspectBodyreferences inpkg/linters/seenmapbool/ -
make fmt,make build,make test-unit, andmake lintpass - PR description explains the agent-discoverability rationale
Notes for the Agent
- This is a pure rename. Behavior must not change.
- If the new name conflicts with an existing identifier, skip the rename and explain why in the PR.
- The testdata fixture under
pkg/linters/seenmapbool/testdata/src/seenmapbooldoes not reference the function and needs no change.
References: §43418930854
Generated by 🔧 Daily Go Function Namer · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 8.3K · ◷
- expires on Nov 20, 2026, 3:49 AM UTC-08:00
Activity
github-actions commentedon Nov 13, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪