Skip to content

enforce mapclearloop in CI linter gates alongside mapdeletecheck - #46413

Merged
pelikhan merged 3 commits into
mainfrom
copilot/mapclearloop-enforce-readiness
Jul 18, 2026
Merged

enforce mapclearloop in CI linter gates alongside mapdeletecheck#46413
pelikhan merged 3 commits into
mainfrom
copilot/mapclearloop-enforce-readiness

Conversation

Copilot AI commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

mapclearloop was absent from the CI enforcement gates despite being production-ready: type-resolved, shadow-safe, comment-safe, and golden-verified with RunWithSuggestedFixes. Its sibling mapdeletecheck was already enforced, creating an asymmetry where the more carefully guarded analyzer was left out.

Changes

  • .github/workflows/cgo.yml: Add -mapclearloop to both LINTER_FLAGS invocations (prod gate and wasm gate), immediately before -mapdeletecheck
- LINTER_FLAGS="... -bytesbufferstring -ioutildeprecated -mapdeletecheck -test=false"
+ LINTER_FLAGS="... -bytesbufferstring -ioutildeprecated -mapclearloop -mapdeletecheck -test=false"

Zero production violations exist today — the only production-adjacent candidate (pkg/cli/devcontainer.go:316-319) uses a guarded if ... { delete(...) } body, which the analyzer correctly ignores (it requires len(body.List) == 1 with a bare unconditional delete).

Copilot AI and others added 2 commits July 18, 2026 10:52
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add mapclearloop to enforced analyzer list enforce mapclearloop in CI linter gates alongside mapdeletecheck Jul 18, 2026
Copilot AI requested a review from pelikhan July 18, 2026 11:00
@pelikhan
pelikhan marked this pull request as ready for review July 18, 2026 11:16
Copilot AI review requested due to automatic review settings July 18, 2026 11:16
@pelikhan
pelikhan merged commit 0b8e882 into main Jul 18, 2026
21 checks passed
@pelikhan
pelikhan deleted the copilot/mapclearloop-enforce-readiness branch July 18, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables the production-ready mapclearloop analyzer in CI.

Changes:

  • Adds -mapclearloop to production and WASM custom-linter gates.
Show a summary per file
File Description
.github/workflows/cgo.yml Enforces mapclearloop alongside mapdeletecheck in both gates.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.14

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

Labels

None yet

Projects

None yet

3 participants