Skip to content

[lint-monster] LintMonster: function-length refactoring backlog (674 findings) #52814

Description

@github-actions

Summary

Daily make golint-custom found 674 function-length findings across pkg/workflow and pkg/cli. Per LintMonster policy, all long-function / largefunc findings in these directories are tracked as one shared topic: function-length refactoring.

Current authoritative count

  • Total findings: 674
  • pkg/workflow: 287
  • pkg/cli: 387

Representative diagnostics

  • pkg/workflow/awf_config.go: BuildAWFConfigJSON is 300 lines long (limit: 60)
  • pkg/workflow/safe_outputs_config_extraction.go: extractSafeOutputsConfig is 376 lines long (limit: 60)
  • pkg/cli/add_workflow_pr.go: addWorkflowsWithPR is 131 lines long (limit: 60)

Affected paths

  • pkg/workflow/**
  • pkg/cli/**

Expected outcome

Reduce the current backlog by extracting helpers and narrowing responsibilities in oversized functions, without changing behavior. Keep each remediation slice small and reviewable.

Next refactoring slices

  • Start with the largest pkg/workflow hotspots such as BuildAWFConfigJSON, extractSafeOutputsConfig, and other 150+ line builders
  • Tackle high-churn safe-output and compiler helpers with localized helper extraction
  • Tackle the largest pkg/cli workflow, codemod, and audit helpers in small batches
  • Validate each slice with make golint-custom

Remediation checklist

  • Keep remediation scoped to this shared function-length backlog only
  • Prefer minimal, targeted code edits that extract small helpers instead of broad redesigns
  • Preserve behavior and existing tests; add coverage only when a touched area needs it
  • Validate the final result with make golint-custom

Copilot execution guidance

Use skill-fused constraints for this lint group:

  1. Work only on the long-function findings in pkg/workflow and pkg/cli.
  2. Prefer helper extraction, smaller focused builders, and narrow responsibility splits.
  3. Keep edits minimal and avoid mixing unrelated cleanups.
  4. Run make golint-custom before finishing and ensure the touched findings are reduced or removed.

Duplicate handling

This issue supersedes prior function-length backlog snapshots. Closed duplicates linked from this scan: none.> Generated by 🧌 LintMonster · gpt54 · 13.3 AIC · ⌖ 5.42 AIC · ⊞ 5.9K ·

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions