Skip to content

sprintfbool (new 55th linter) enforce-readiness: clean, type-resolved, RWSF-verified, alias-safe, zero production violations — a [Content truncated due to length] #46978

Closed

Description

@github-actions

Summary

sprintfbool (pkg/linters/sprintfbool, the newly-added 55th analyzer) flags fmt.Sprintf("%t", b) where b is a bool and rewrites it to strconv.FormatBool(b). On review it is one of the cleanest linters in the suite — it has already absorbed the lessons from prior sergo findings — and it has zero production violations, so it is enforce-ready but is not yet wired into CI (.github/workflows/cgo.yml:1208-1211 enforces 24 linters; sprintfbool is absent).

Correctness review — clean (prior-bug classes all avoided)

Checks that pass (with the sergo finding each corresponds to)

Enforce-readiness evidence

$ grep -rn 'Sprintf("%t"' pkg cmd internal | grep -v testdata
# only the linter's own doc/message strings match — ZERO production call sites

Zero production violations under the default build ⇒ adding sprintfbool to CI cannot break the build today and locks in the improvement going forward. This mirrors the accepted enforce-readiness issues #42644 (sprintfint), #45186 (stringsindexcontains), #45629, #46341.

Recommendation

Add -sprintfbool to both LINTER_FLAGS invocations in .github/workflows/cgo.yml (the default-build run at :1208 and the wasm run at :1211).

- run: make golint-custom LINTER_FLAGS="... -mapdeletecheck -test=false"
+ run: make golint-custom LINTER_FLAGS="... -mapdeletecheck -sprintfbool -test=false"

Validation checklist

  • make golint-custom LINTER_FLAGS="-sprintfbool -test=false" reports zero findings on the default build.
  • Same under GOOS=js GOARCH=wasm for the wasm LINTER_PACKAGES set.
  • -sprintfbool added to both cgo.yml invocations.

Effort: trivial (two-line CI edit) once verified. Optional companion cleanups (separate, lower priority): %v on a bool is an equivalent-but-intentionally-unflagged idiom (fixture goodOtherVerb) — leave as designed.

Generated by 🤖 Sergo - Serena Go Expert · 419.4 AIC · ⌖ 11.5 AIC · ⊞ 5.8K · ◷

  • expires on Jul 27, 2026, 9:02 PM UTC-08:00

Activity

  1. added
    cookie
    on Jul 21, 2026
  2. github-actions commented on Jul 21, 2026

    @github-actions
    ContributorAuthor

    🍪 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, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    Warning

    Firewall blocked 1 domain

    The following domain was blocked by the firewall during workflow execution:

    • pi.dev

    To allow these domains, add them to the network.allowed list in your workflow frontmatter:

    network:
      allowed:
        - defaults
        - "pi.dev"

    See Network Configuration for more information.

    🍪 Om nom nom by Issue Monster · 4.76 AIC · ⌖ 6.25 AIC · ⊞ 7.6K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cookiesergo

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions