Skip to content

[Code Quality] Add mapclearloop linter to CI enforcement in .github/workflows/cgo.yml #46437

Closed as not planned

Description

@github-actions

Description

The mapclearloop linter (analyzer #50 in cmd/linters/main.go) is production-ready: type-resolved detection, shadow-safe + comment-safe autofix, and analysistest.RunWithSuggestedFixes golden verification. There are zero production violations in the repo.

However, its sibling mapdeletecheck is CI-enforced while mapclearloop appears nowhere in .github/workflows/cgo.yml.

Suggested Changes

  • Add -mapclearloop to LINTER_FLAGS strings in .github/workflows/cgo.yml next to -mapdeletecheck.
  • There are two gate blocks to update (prod gate line ~1208 and wasm gate ~1211).

Files Affected

  • .github/workflows/cgo.yml (lines ~1208, ~1211) — LINTER_FLAGS prod and wasm gates
  • cmd/linters/main.go — confirms mapclearloop is registered as analyzer allow list for expressions #50
  • pkg/linters/mapclearloop.go — source of truth for analyzer implementation

Success Criteria

  • -mapclearloop appears in both LINTER_FLAGS strings in cgo.yml.
  • CI passes with zero violations (repo-wide search confirms no flagged patterns exist).
  • No other linter flags are changed.

Source

Extracted from Sergo Report - 2026-07-18 #46342

Priority

High — linter is ready to enforce; keeping it unenforced means new violations can silently accumulate.

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 210.1 AIC · ⌖ 7.63 AIC · ⊞ 7K · ◷

  • expires on Jul 19, 2026, 5:18 AM UTC-08:00

Activity

  1. github-actions commented on Jul 19, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-07-19T13:18:16.704Z.

    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