Skip to content

[lint-monster] function-length refactoring backlog (682 findings) #45873

Description

@github-actions

Daily custom lint summary

Current make golint-custom run reports 682 function-length (largefunc/long-function) findings across pkg/workflow and pkg/cli. Per repo policy this is tracked as one shared topic: function-length refactoring.

Affected areas

  • pkg/workflow/** — bulk of backlog
  • pkg/cli/** — additional long-function findings

Representative diagnostics

  • pkg/workflow/maintenance_workflow_yaml.go:35:6: buildMaintenanceWorkflowYAML is 961 lines long (limit: 60)
  • pkg/workflow/frontmatter_on_section_cleanup.go:13:20: commentOutProcessedFieldsInOnSection is 695 lines long (limit: 60)
  • pkg/workflow/engine.go:197:20: ExtractEngineConfig is 410 lines long (limit: 60)
  • pkg/workflow/awf_helpers.go:225:6: BuildAWFCommand is 355 lines long (limit: 60)
  • pkg/cli/add_workflow_resolution.go:70:6: ResolveWorkflows is 250 lines long (limit: 60)
  • pkg/cli/audit_report.go:262:6: buildAuditData is 200 lines long (limit: 60)

Expected outcome

Reduce the backlog by extracting cohesive helpers while preserving behavior and tests. Prefer small, targeted refactors over broad rewrites.

Remediation checklist

  • Pick a narrow slice in one file and split one oversized function into cohesive helpers or focused files
  • Keep edits scoped to function-length findings only for the selected slice
  • Preserve public behavior and existing interfaces unless a small internal helper extraction is enough
  • Prefer many small files/helpers over growing a monolithic file further
  • Run make golint-custom after the change and confirm the targeted finding count drops

Next suggested slices

  • pkg/workflow/maintenance_workflow_yaml.go
  • pkg/workflow/frontmatter_on_section_cleanup.go
  • pkg/workflow/engine.go
  • pkg/workflow/awf_helpers.go
  • pkg/cli/add_workflow_resolution.go

No prior authoritative lint-monster function-length tracking issue was found in currently readable open issues/PRs.

Generated by 🧌 LintMonster · 29.4 AIC · ⌖ 7.15 AIC · ⊞ 4.4K ·

  • expires on Jul 22, 2026, 7:43 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