Skip to content

[lint-monster] remediate small collection/perf custom-lint findings #51500

Description

@github-actions

Overview

Daily make golint-custom found 14 smaller remediation findings grouped as collections and small perf/style fixes.

Key metrics

  • map[string]bool used as a set: 8 findings
  • string concatenation in loops (strings.Builder preferred): 2 findings
  • empty-string checks (s == "" / s != ""): 3 findings
  • sort.Slice type-safety modernization (slices.SortFunc): 1 finding

Representative diagnostics

  • pkg/workflow/central_slash_command_workflow.go:725: map[string]bool "typeSet" used as a set
  • pkg/cli/compile_pipeline.go:687: sort.Slice is not type-safe; use slices.SortFunc instead
  • pkg/workflow/copilot_engine_execution.go:758: string concatenation inside a loop allocates O(n2); use strings.Builder instead

Affected paths

  • pkg/workflow/central_slash_command_workflow.go
  • pkg/workflow/samples_replay.go
  • pkg/workflow/samples_validation.go
  • pkg/cli/runner_guard_activation_gate.go
  • pkg/cli/compile_pipeline.go
  • pkg/workflow/copilot_engine_execution.go
  • pkg/cli/mcp_tools_readonly.go
  • pkg/workflow/copilot_logs.go
  • pkg/workflow/engine_definition.go

Expected outcome

Apply the narrow modernization/perf fixes only at the flagged sites without broad cleanup outside this group.

Remediation checklist

  • Keep the PR limited to these 14 findings.
  • Replace set-like map[string]bool with map[string]struct{} where semantics match.
  • Swap loop concatenation to strings.Builder or equivalent minimal fix.
  • Use direct empty-string comparisons and type-safe sort helpers where flagged.
  • Run make golint-custom after the changes.
  • If Go files change, run make fmt.

Generated by 🧌 LintMonster · gpt54 · 25.8 AIC · ⌖ 6.08 AIC · ⊞ 5.8K · ◷

  • expires on Aug 15, 2026, 7:12 PM UTC-08:00

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions