Skip to content

[function-namer] Go function rename plan: pkg/linters/seenmapboolΒ #57142

Description

@github-actions

🏷️ Go Function Rename Plan

Package Analyzed: pkg/linters/seenmapbool
Analysis Date: 2026-08-30
Round-Robin Position: package 116 of 187 total packages
Functions Analyzed: 8 functions across 1 files

Why This Matters

When AI coding agents search for functions to complete a task, they rely on function
names to understand what code does. Clear, descriptive names increase the likelihood
that an agent will find the right function instead of reimplementing existing logic.
Functions in the same package also call each other, so reviewing them together gives
better context for rename decisions.

Rename Suggestions

pkg/linters/seenmapbool/seenmapbool.go

Current Name Suggested Name Reason
run() analyzeSeenMapBoolUsage() The analyzer entrypoint currently uses a very generic verb. The new name makes it easier for an agent searching for the package's top-level analysis routine to find the function immediately.
inspectBody() reportSeenMapBoolSetUsageInBody() The current name only says it inspects a body, not what it is looking for. The new name exposes both the reporting behavior and the map-as-set concern.
findNonSetMaps() findCandidateMapsUsedBeyondSetSemantics() The current name is understandable but underspecified. The new name clarifies that the function filters candidate maps by detecting uses that go beyond pure set-style true assignments.
markIfNonSetLiteral() markCandidateMapIfCompositeLiteralUsesNonTrueValue() The current name hides the composite-literal-specific behavior. The new name helps an agent find the helper when looking for logic that disqualifies candidate maps based on literal contents.

All functions in this file (for reference):

  • init() β€” βœ… Clear, standard Go initialization hook
  • run() β€” ⚠️ Rename suggested (see table above)
  • inspectBody() β€” ⚠️ Rename suggested (see table above)
  • collectSeenMapCandidates() β€” βœ… Clear, no change needed
  • findNonSetMaps() β€” ⚠️ Rename suggested (see table above)
  • markIfNonSetLiteral() β€” ⚠️ Rename suggested (see table above)
  • isMapStringBool() β€” βœ… Clear, no change needed
  • isBoolTrue() β€” βœ… Clear, no change needed
πŸ€– Agentic Implementation Plan

Agentic Implementation Plan

This issue is designed to be assigned to a coding agent. The agent should implement
all rename suggestions below in a single pull request.

Prerequisites

  • Read each rename suggestion and verify it is accurate by reviewing the function body
  • Check for any Go interface constraints that prevent renaming (e.g., must match interface method name)

Implementation Steps

For each rename suggestion, follow this sequence:

1. Rename the function in pkg/linters/seenmapbool/seenmapbool.go

// Old
func oldName(args) returnType {

// New
func newName(args) returnType {

2. Update all call sites

Use grep to find every caller and update the reference:

grep -rn "oldName" pkg/ --include="*.go"

Also check test files:

grep -rn "oldName" pkg/ --include="*_test.go"

3. Verify compilation after each rename

make build

4. Run tests after all renames are complete

make test-unit
make lint

Suggested rename sequence and call sites

  1. run β†’ analyzeSeenMapBoolUsage
    • Update analyzer registration in pkg/linters/seenmapbool/seenmapbool.go
  2. inspectBody β†’ reportSeenMapBoolSetUsageInBody
    • Update the call from the analyzer traversal in the same file
  3. findNonSetMaps β†’ findCandidateMapsUsedBeyondSetSemantics
    • Update the local helper call in the same file
  4. markIfNonSetLiteral β†’ markCandidateMapIfCompositeLiteralUsesNonTrueValue
    • Update both helper call sites in the same file

Commit Convention

Each rename should be a focused commit:

refactor: rename <oldName> to <newName> for clarity

Validation Checklist

  • All renames implemented
  • All call sites updated (Go files and test files)
  • make build passes with no errors
  • make test-unit passes
  • make lint passes
  • PR description explains the agent-discoverability rationale

Notes for the Agent

  • This is a pure rename refactor β€” behavior must not change, only names
  • If a rename causes unexpected complexity (e.g., name conflicts, interface constraints),
    skip it and leave a comment in the PR explaining why
  • Follow existing naming conventions documented in AGENTS.md
  • Unexported functions used only as closures or immediately-invoked can be skipped

Generated by the Daily Go Function Namer workflow
Run: 33309508896

Generated by πŸ”§ Daily Go Function Namer Β· pi Β· gpt54 Β· 13.3 AIC Β· βŒ– 9.54 AIC Β· ⊞ 8.9K Β· β—·

  • expires on Sep 6, 2026, 3:45 AM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions