Skip to content

[Code Quality] Add CI enforcement for appendoneelement, timenowsub, and stringsjoinone linters #48057

Closed as not planned

Description

@github-actions

Description

Three custom linters have been verified as production-clean and enforcement-ready but are not yet enabled in CI:

  • appendoneelement — rewrites append(s, []T{x}...) to append(s, x). Zero production violations, type-gated correctly.
  • timenowsub — rewrites time.Now().Sub(t) to time.Since(t). Zero production violations, uses safe type resolution.
  • stringsjoinone — simplifies single-element strings.Join. Zero production violations, golden-verified.

All three are clean (zero violations in default and js/wasm), autofix-capable with RunWithSuggestedFixes, nolint+filecheck-wired, and golden-test verified.

Suggested Changes

  • Add all three linters to the enforced set in .github/workflows/cgo.yml (around lines 1227/1230)
  • Verify make golint-custom passes with the new enforcement

Files Affected

  • .github/workflows/cgo.yml (enforcement list ~line 1227)
  • pkg/linters/registry.go

Success Criteria

  • All three linters listed in the CI-enforced set in cgo.yml
  • make golint-custom passes cleanly
  • CI enforces these checks on new PRs

Source

Extracted from [sergo] Sergo Report - 2026-07-25

Priority

Medium — Low-risk quality guard; linters already verified production-clean.

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · sonnet46 · 47 AIC · ⌖ 5.49 AIC · ⊞ 7.2K · ◷

  • expires on Jul 26, 2026, 11:12 AM UTC-08:00

Activity

  1. github-actions commented on Jul 26, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-07-26T19:12:27.512Z.

    Closed by Workflow

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

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