Skip to content

[lint-monster] Reduce custom lint function-length hotspots in pkg/cli command flows #49252

Description

@github-actions

Summary

Daily make golint-custom reports a concentrated largefunc backlog in pkg/cli command-flow code. This issue tracks a narrow execution slice focused on the most prominent CLI hotspots, distinct from the repo-wide shared tracker.

Root cause group

Long orchestration functions in CLI command handlers and support flows are doing too much inline work and need extraction into small helpers.

Affected files

  • pkg/cli/logs_download.go
  • pkg/cli/logs_report.go
  • pkg/cli/compile_pipeline.go
  • pkg/cli/update_workflows.go
  • pkg/cli/update_extension_check.go
  • pkg/cli/org_runner.go
  • pkg/cli/mcp_tools_privileged.go

Representative diagnostics

  • pkg/cli/logs_download.go:702 — downloadRunArtifacts is 386 lines long
  • pkg/cli/logs_report.go:181 — buildLogsData is 317 lines long
  • pkg/cli/compile_pipeline.go:331 — compileAllFilesInDirectory is 295 lines long
  • pkg/cli/compile_pipeline.go:47 — compileSpecificFiles is 274 lines long
  • pkg/cli/update_extension_check.go:49 — upgradeExtensionIfOutdated is 267 lines long
  • pkg/cli/org_runner.go:138 — runCommandForOrg is 262 lines long

Expected outcome

Reduce the assigned pkg/cli largefunc findings by extracting helper functions while preserving behavior and keeping the PR narrow.

Remediation checklist

  • Keep changes scoped to the listed pkg/cli files and largefunc findings only
  • Prefer minimal, targeted helper extraction over broad rewrites
  • Preserve existing behavior, flags, logging, and output formatting
  • Keep helpers file-local unless reuse clearly warrants otherwise
  • Validate with make golint-custom

Generated by 🧌 LintMonster · gpt54 · 39 AIC · ⌖ 9.81 AIC · ⊞ 5.3K · ◷

  • expires on Aug 6, 2026, 7:49 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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions