Skip to content

[lint-monster] Function-length refactoring backlog (2026-06-30) #42403

Description

@github-actions

Daily lint scan summary

Custom lint scan on 2026-06-30 found 767 shared largefunc findings in the main function-length backlog: 307 in pkg/workflow and 460 in pkg/cli. This issue is the single consolidated tracking issue for that shared backlog.

Affected paths

  • pkg/workflow/** — 307 findings
  • pkg/cli/** — 460 findings

Representative diagnostics

  • pkg/workflow/compiler_main_job.go:26: buildMainJob is 420 lines long (limit: 60)
  • pkg/workflow/safe_outputs_config.go:58: extractSafeOutputsConfig is 752 lines long (limit: 60)
  • pkg/workflow/maintenance_workflow_yaml.go:34: buildMaintenanceWorkflowYAML is 960 lines long (limit: 60)
  • pkg/cli/audit_report_render.go:24: renderConsole is 310 lines long (limit: 60)
  • pkg/cli/actionlint.go:222: runActionlintOnFilesWithOptions is 184 lines long (limit: 60)
  • pkg/cli/add_workflow_resolution.go:66: ResolveWorkflows is 198 lines long (limit: 60)

Expected outcome

Reduce the pkg/workflow and pkg/cli largefunc backlog by carving out focused helpers and smaller files while preserving behavior. Keep this issue authoritative for the shared function-length refactoring topic instead of opening separate pkg/workflow vs pkg/cli backlog issues.

Remediation checklist

  • Keep edits scoped to the assigned lint slice only
  • Prefer minimal helper extraction and cohesive file/function splits
  • Avoid unrelated cleanup outside the chosen slice
  • Re-run make golint-custom after the slice is fixed
  • Update this issue with the remaining count/path coverage after each slice lands

Next slices to refactor

  • pkg/workflow/compiler_* and YAML generation hot spots
  • pkg/workflow/safe_outputs_* configuration and job builders
  • pkg/workflow/frontmatter_*, tools*, and mcp_* clusters
  • pkg/cli/audit_* reporting/rendering cluster
  • pkg/cli/add_* interactive/setup cluster
  • pkg/cli/codemod_* and actionlint-related helpers

Copilot instructions

Use the minimum relevant guidance only: make narrowly-scoped changes for one slice at a time, prefer small focused helpers/files, and validate with make golint-custom.

Duplicate issues linked/closed

  • None found from available repository issue listings at triage time.

Generated by 🧌 LintMonster · 80.8 AIC · ⌖ 20.4 AIC · ⊞ 4.4K ·

  • expires on Jul 6, 2026, 7:52 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