Skip to content

[lint-monster] Function-length refactoring backlog: 114 functions exceed 60-line limit #39175

@github-actions

Description

@github-actions

Daily Lint Remediation

Custom linter identified 114 functions that exceed the 60-line length limit across the codebase.

Distribution

  • pkg/workflow/ (70+ functions): Largest concentration

    • compiler_main_job.go: buildMainJob (401 lines) — critical refactor target
    • copilot_engine_execution.go: GetExecutionSteps (643 lines) — largest function
    • compiler_safe_outputs_job.go: Multiple 200+ line functions
    • Other: claude_engine, codex_engine, cache, checkout, compiler utilities
  • pkg/cli/ (25+ functions)

    • Various audit, compile, and command processing functions
  • pkg/parser/ (5+ functions)

    • Schema suggestions, field extraction utilities

Top Priority Refactor Targets

  1. copilot_engine_execution.go:GetExecutionSteps (643 lines)

    • Primary candidate for breaking into 10+ smaller functions
    • Handles multiple distinct tool expansion and processing phases
  2. compiler_main_job.go:buildMainJob (401 lines)

    • Can be split into logical job-building phases
  3. compiler_safe_outputs_job.go (multiple 200+ line functions)

    • buildSafeOutputsJobFromParts (229 lines)
    • buildSafeOutputsHandlerOutputsAndActionSteps (220 lines)
    • buildSafeOutputsSetupAndDownloadSteps (87 lines)

Remediation Strategy

  • Extract logical sub-phases into separate functions
  • Maintain original behavior and test coverage
  • Use consistent naming conventions (verb_noun pattern)
  • Prioritize functions by line count and complexity

Current Status

This is a shared backlog issue consolidating all function-length findings. Track overall progress here rather than opening per-function sub-issues.

Current finding count: 114 functions

Generated by 🧌 LintMonster · 151.7 AIC · ⌖ 4.43 AIC · ⊞ 20.3K ·

  • expires on Jun 20, 2026, 7:51 PM UTC-08:00

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions