Skip to content

[lint-monster] lint-monster: function-length refactoring — pkg/cli slice B #47180

Description

@github-actions

Daily custom-linter scan identified a function-length slice in pkg/cli that should be handled independently from the shared backlog tracker.

Scope for this slice:

  • Focus on the highest-impact pkg/cli long functions first
  • Representative diagnostics from the current scan:
    • pkg/cli/audit_report_render.go: renderConsole is 310 lines long (limit: 60)
    • pkg/cli/audit_report.go: buildAuditData is 200 lines long (limit: 60)
    • pkg/cli/add_interactive_git.go: createWorkflowPRAndConfigureSecret is 171 lines long (limit: 60)
    • pkg/cli/audit_report_analysis.go: generateFindings is 158 lines long (limit: 60)
    • pkg/cli/add_workflow_pr.go: addWorkflowsWithPR is 128 lines long (limit: 60)

Expected outcome:

  • Refactor a coherent subset of these pkg/cli functions into smaller helpers or focused files so the assigned findings are reduced without changing behavior.

Remediation checklist:

  • Keep work scoped to this lint group only
  • Prefer minimal, targeted code edits
  • Extract cohesive helper functions or move independent logic into focused files where that cleanly reduces function length
  • Preserve behavior and existing tests
  • Validate with make golint-custom before handoff

Skill fusion guidance:

  • Use small focused files over monolithic edits when an extracted helper has a clear responsibility
  • Do not broaden the change into unrelated cleanup
  • Report the exact functions shortened and the updated lint outcome

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 🧌 LintMonster · gpt54 19.3 AIC · ⌖ 5.83 AIC · ⊞ 4.5K ·

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions