Skip to content

[lint-monster] function-length refactoring backlog refresh — 675 findings across pkg/workflow and pkg/cli #44458

Description

@github-actions

Summary

Daily make golint-custom found a shared largefunc backlog that should be tracked as a single topic: function-length refactoring.

Current authoritative count from this lint run: 675 function-length findings.

Affected areas:

  • pkg/workflow: 284 findings
  • pkg/cli: 377 findings
  • additional function-length findings outside those path buckets in the current diagnostics snapshot: 14

Representative diagnostics:

  • pkg/workflow/compiler_main_job.go:26: buildMainJob is 420 lines long
  • pkg/workflow/frontmatter_extraction_yaml.go:131: commentOutProcessedFieldsInOnSection is 656 lines long
  • pkg/workflow/maintenance_workflow_yaml.go:35: buildMaintenanceWorkflowYAML is 961 lines long
  • pkg/cli/audit_report_render.go:24: renderConsole is 310 lines long
  • pkg/cli/add_workflow_resolution.go:66: ResolveWorkflows is 198 lines long

Expected outcome:

  • Reduce the shared largefunc backlog with focused extractions that preserve behavior and tests.
  • Keep work sliced into reviewable refactors rather than broad rewrites.

Remediation checklist

  • Work only on the assigned function-length slice; do not mix unrelated lint fixes.
  • Prefer minimal, targeted extractions into helper functions/types.
  • Preserve existing behavior and test coverage.
  • Validate by running make golint-custom before finishing.
  • Prioritize the biggest/highest-churn hotspots first.

Suggested next slices

  • pkg/workflow/maintenance_workflow_yaml.go (buildMaintenanceWorkflowYAML)
  • pkg/workflow/frontmatter_extraction_yaml.go (commentOutProcessedFieldsInOnSection)
  • pkg/workflow/compiler_main_job.go (buildMainJob)
  • pkg/workflow/tool_description_enhancer.go (enhanceToolDescription)
  • pkg/cli/audit_report_render.go (renderConsole)
  • pkg/cli/add_workflow_resolution.go (ResolveWorkflows)

Duplicates linked/closed in this run: none.

Fused guidance for any assigned agent:

  • Keep remediation scoped to this lint group only.
  • Prefer minimal, targeted code edits.
  • Validate fixes with make golint-custom.

Generated by 🧌 LintMonster · 15.1 AIC · ⌖ 5.56 AIC · ⊞ 4.4K ·

  • expires on Jul 15, 2026, 7:56 PM UTC-08:00

Metadata

Metadata

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