Skip to content

[lint-monster] targeted custom-lint fixes outside function-length backlog #47449

Description

@github-actions

Summary

The latest make golint-custom run reports 24 non-function-length findings that can be addressed with targeted code cleanups.

Root-cause groups in scope:

1. Hard-coded path constants

  • pkg/cli/copilot_agents.go:87: hard-coded file path .github/skills/agentic-workflows directory
  • pkg/cli/copilot_agents.go:147: hard-coded file path .github/agents directory

2. Environment/config coupling

  • pkg/cli/bootstrap_profile_github_app.go (multiple sites): os.Getenv couples the library to the process environment
  • pkg/cli/bootstrap_profile_helpers.go (multiple sites): same root cause

3. Small API / correctness cleanups

  • pkg/workflow/github_cli.go:107: nil context.Context passed
  • pkg/workflow/safe_outputs_tools_generation.go:314: map[string]bool used as a set
  • pkg/workflow/workflow_builder.go:505: map[string]bool used as a set
  • pkg/cli/bootstrap_profile_manifest.go:266,268: redundant .Error()
  • pkg/workflow/llm_provider.go:35: use s == "" instead of len(s) == 0
  • pkg/cli/mcp_inspect_inspector.go:183,227: replace time.Sleep with select on ctx.Done()

Representative diagnostics:

  • pkg/workflow/github_cli.go:107:24: nil passed as context.Context; use context.Background() or context.TODO() instead
  • pkg/cli/bootstrap_profile_github_app.go:42:32: os.Getenv couples the library to the process environment; pass configuration explicitly instead
  • pkg/workflow/safe_outputs_tools_generation.go:314:3: map[string]bool "supported" used as a set; use map[string]struct{} to avoid allocating a bool per entry

Expected outcome

Resolve the non-function-length custom-lint findings with minimal, targeted edits while preserving behavior.

Remediation checklist

  • Keep changes scoped to the 24 non-function-length findings in this issue
  • Extract named constants for repeated hard-coded paths
  • Reduce environment coupling by passing configuration explicitly where practical
  • Apply narrow correctness/perf cleanups only where reported
  • Validate with make golint-custom

Skill-fused guidance for the assignee

  • Validate fixes by running make golint-custom
  • Keep remediation scoped to the assigned lint group
  • Prefer minimal, targeted code edits
  • When splitting logic, favor small focused helpers over broad rewrites

Generated by 🧌 LintMonster · gpt54 26.3 AIC · ⌖ 7.47 AIC · ⊞ 4.5K ·

  • expires on Jul 29, 2026, 7:45 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