Skip to content

[lint-monster] lint-monster: function-length refactoring backlog (724 findings) #46117

Description

@github-actions

Daily custom-linter backlog

Current make golint-custom run reports 724 function-length findings (largefunc max-lines=60). Per lint-monster policy, all long-function findings in pkg/workflow and pkg/cli are tracked under a single shared topic: function-length refactoring.

Current counts

  • pkg/workflow: 296 findings
  • pkg/cli: 398 findings
  • other paths (cmd/gh-aw, pkg/linters): 30 findings

Representative diagnostics

  • pkg/workflow/maintenance_workflow_yaml.go: buildMaintenanceWorkflowYAML is 961 lines
  • pkg/workflow/frontmatter_on_section_cleanup.go: commentOutProcessedFieldsInOnSection is 697 lines
  • pkg/cli/logs_orchestrator.go: DownloadWorkflowLogs is 455 lines
  • pkg/cli/run_workflow_execution.go: RunWorkflowOnGitHub is 438 lines
  • cmd/gh-aw/main.go: init is 440 lines

Expected outcome

Reduce the shared largefunc backlog with minimal, behavior-preserving refactors that split long functions into smaller helpers/files while keeping current tests and outputs stable.

Remediation checklist

  • Pick a small, coherent slice of related long functions; keep scope targeted
  • Prefer extracting focused helper functions or moving cohesive logic into dedicated files
  • Preserve public behavior and existing interfaces unless a tiny internal signature change is clearly safer
  • Validate each slice with make golint-custom
  • Avoid unrelated cleanup while touching these files

Next suggested slices

  • pkg/cli logs pipeline (logs_command.go, logs_orchestrator.go, logs_download.go, logs_report.go)
  • pkg/cli audit rendering/report pipeline (audit_report*.go, audit_diff*.go)
  • pkg/workflow maintenance/compiler YAML generators (maintenance_workflow_yaml.go, compiler_yaml*.go)
  • pkg/workflow safe outputs compilation (compiler_safe_outputs*.go, safe_outputs_config*.go)
  • pkg/workflow engine execution builders (claude_engine.go, codex_engine.go, gemini_engine.go, pi_engine.go)
  • cmd/gh-aw/main.go command wiring and pkg/linters/* analyzer internals

Fused skill guidance for remediation agents

  • Keep remediation scoped to the assigned lint slice only
  • Prefer minimal, targeted code edits over broad rewrites
  • Favor many small focused files/helpers instead of growing large monoliths
  • Validate fixes by running make golint-custom

No duplicate function-length tracking issue could be searched with gh issue list because the CLI returned malformed version; this issue is being created as the authoritative tracker for the current run.

Generated by 🧌 LintMonster · 22.9 AIC · ⌖ 10.7 AIC · ⊞ 4.4K ·

  • expires on Jul 23, 2026, 7:44 PM UTC-08:00

Metadata

Metadata

Labels

Type

No type

Fields

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