Skip to content

[lint-monster] function-length refactoring backlog #54699

Description

@github-actions

Summary

Daily make golint-custom surfaced a consolidated function-length refactoring backlog from the custom largefunc rule (max-lines=60). This run found 678 findings total across pkg/cli, pkg/workflow, and pkg/console, and per workflow policy these are tracked as a single shared topic.

Current finding count

  • Total findings: 678
  • pkg/cli: 385
  • pkg/workflow: 292
  • pkg/console: 1

Representative diagnostics

  • pkg/console/progress.go:81Update is 61 lines long
  • pkg/workflow/awf_config.go:476BuildAWFConfigJSON is 320 lines long
  • pkg/workflow/safe_outputs_config_extraction.go:45extractSafeOutputsConfig is 376 lines long
  • pkg/workflow/threat_detection_inline_engine.go:15buildDetectionEngineExecutionStep is 297 lines long
  • pkg/cli/add_package_ownership.go:246syncManifestManagedResources is 171 lines long
  • pkg/cli/mcp_tools_privileged.go — 6 separate function-length findings in one file

Affected areas

  • pkg/cli command, audit, codemod, and MCP-related helpers
  • pkg/workflow compiler, safe-outputs, parsing, validation, and engine helpers
  • pkg/console/progress.go

Expected outcome

Refactor overlong functions into smaller helpers while preserving behavior, keeping each work slice tightly scoped and validating with make golint-custom.

Remediation checklist

  • Keep edits scoped to the assigned function-length slice only; do not mix unrelated cleanup.
  • Prefer minimal helper extraction over broad rewrites.
  • Preserve public behavior, signatures, and surrounding tests unless a small local helper is enough.
  • Follow existing file/domain boundaries; create focused helpers/files only when they clarify a single responsibility.
  • Validate the slice with make golint-custom before finishing.

Suggested next slices

  • Slice 1: pkg/cli highest-density files (for example mcp_tools_privileged.go, forecast_compute.go, audit_diff_render.go, related local helpers)
  • Slice 2: pkg/workflow safe-outputs / compiler-heavy files with the largest single functions
  • Slice 3: pkg/workflow parsing / validation / rendering backlog plus the lone pkg/console overflow

Copilot instructions

  1. Fix only the findings in the assigned slice.
  2. Use skill-fused guidance: prefer small, targeted helper extraction and existing organization patterns.
  3. Avoid opportunistic renames or behavior changes.
  4. Final validation must be make golint-custom.

Duplicate handling

  • No existing open or recent closed lint-monster function-length tracking issue was found in the latest repository issue sample queried during this run.
  • No duplicate issues were closed in this run.

Generated by 🧌 LintMonster · gpt54 · 20.8 AIC · ⌖ 6.33 AIC · ⊞ 6K ·

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