Skip to content

[lint-monster] Non-workflow function-length refactoring (2026-06-29) #42162

Description

@github-actions

Summary

Custom lint scan on 2026-06-29 found 10 long-function findings outside pkg/workflow and pkg/cli. The root cause is the same largefunc rule, but these findings live in non-shared subsystems and should be tackled separately from the main function-length backlog.

Findings

  • pkg/console/console.go:190RenderTable
  • pkg/github/label_objective_mapping.go:36ComputeObjectiveValue
  • pkg/parser/schema_suggestions.go:649findFieldLocationsInSchema
  • cmd/gh-aw/main.go:283 — func literal
  • cmd/gh-aw/main.go:501init
  • cmd/gh-aw/main.go:562 — func literal
  • pkg/linters/errorfwrapv/errorfwrapv.go:53run
  • pkg/linters/hardcodedfilepath/hardcodedfilepath.go:223run
  • pkg/linters/seenmapbool/seenmapbool.go:65inspectBody
  • pkg/linters/timeafterleak/timeafterleak.go:91isInsideLoopSelectComm

Expected outcome

Break up the reported functions into smaller helpers without changing behavior and clear this non-workflow/non-cli subset of largefunc diagnostics.

Remediation checklist

  • Keep changes scoped to the 10 listed findings
  • Prefer extracting small helpers or moving cohesive logic blocks into nearby focused functions/files
  • Avoid mixing this work with the shared pkg/workflow / pkg/cli function-length backlog
  • Preserve tests and behavior
  • Validate with make golint-custom

Copilot instructions

Use the minimum relevant guidance: prefer many small focused helpers over enlarging already-large files, keep edits tightly scoped to these reported functions, and validate with make golint-custom.

Generated by 🧌 LintMonster · 43.5 AIC · ⌖ 10.4 AIC · ⊞ 4.4K ·

  • expires on Jul 5, 2026, 7:51 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