Skip to content

[lint-monster] reduce pkg/cli function-length backlog (first slice) #52208

Description

@github-actions

Overview

Daily make golint-custom found 363 function-length (largefunc) findings in pkg/cli.

Root cause grouping

This issue tracks the pkg/cli execution slice from the shared function-length refactoring backlog. Focus only on pkg/cli functions assigned from this slice.

High-concentration areas

  • add/update/remove command helpers
  • audit diff/render helpers
  • dispatch/frontmatter/logging helpers
  • MCP inspection and privileged tool helpers

Representative diagnostics

  • pkg/cli/add_wizard_command.go:15: NewAddWizardCommand is 123 lines long.
  • pkg/cli/add_package_manifest.go:207: parseRepositoryPackageManifest is 100 lines long.
  • pkg/cli/audit_diff.go:625: computeToolCallsDiff is 131 lines long.
  • pkg/cli/forecast_compute.go: 5 distinct findings in one file.
  • pkg/cli/mcp_tools_privileged.go: 6 distinct findings in one file.

Expected outcome

Land a minimal first slice of pkg/cli helper extractions that measurably reduces the shared backlog without broad rewrites.

Remediation checklist

  • Keep remediation scoped to pkg/cli findings only.
  • Pick a small cluster of related functions in one or two files.
  • Prefer helper extraction and branch splitting over semantic rewrites.
  • Preserve behavior and existing tests.
  • Run make golint-custom after changes.
  • If Go files change, run make fmt.

Fused skill guidance

  • From go-linters: validate the final change with make golint-custom.
  • From developer: keep remediation targeted, prefer minimal edits, and run make fmt after Go changes.

Generated by 🧌 LintMonster · pi · lint-monster daily scan

Generated by 🧌 LintMonster · gpt54 · 29 AIC · ⌖ 4.44 AIC · ⊞ 5.7K ·

  • expires on Aug 18, 2026, 7:22 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions