Summary
Custom lint scan found 70 targeted findings outside the shared function-length refactoring backlog. These are low-risk, mechanical cleanups grouped by small correctness/style root causes.
Included root causes
defer inside loop causing delayed cleanup
- excessive parameter count (options-struct candidate)
map[string]bool used as a set
- redundant
.Error() in formatting
- discarded
json.Unmarshal errors
len(s) > 0 instead of s != ""
len(strings.Split(...)) count anti-pattern
sort.Slice where slices.SortFunc is preferred
time.Sleep instead of select on ctx.Done()
- non-shared largefunc findings under
cmd/ and pkg/linters/
Representative diagnostics
pkg/cli/mcp_inspect_mcp_scripts_server.go:69: defer inside loop
pkg/cli/logs_orchestrator.go:151: buildContinuationIfNeeded has 11 parameters (limit: 8)
pkg/workflow/action_resolver.go: map[string]bool used as a set
pkg/workflow/frontmatter_error.go: redundant .Error() call
pkg/cli/logs_awinfo_backward_compat_test.go: discarded json.Unmarshal error
pkg/cli/mcp_inspect.go: use select with ctx.Done() instead of time.Sleep
Expected outcome
Resolve a coherent subset of these targeted findings with minimal edits and no behavioral regressions.
Remediation checklist
Suggested starting slice
Copilot execution notes
Use only the minimum relevant guidance: keep remediation tightly scoped to the assigned group, prefer direct local fixes over abstraction, and stop after make golint-custom confirms the touched diagnostics are addressed.
Generated by 🧌 LintMonster · 46.1 AIC · ⌖ 4.95 AIC · ⊞ 4.4K · ◷
Summary
Custom lint scan found 70 targeted findings outside the shared
function-length refactoringbacklog. These are low-risk, mechanical cleanups grouped by small correctness/style root causes.Included root causes
deferinside loop causing delayed cleanupmap[string]boolused as a set.Error()in formattingjson.Unmarshalerrorslen(s) > 0instead ofs != ""len(strings.Split(...))count anti-patternsort.Slicewhereslices.SortFuncis preferredtime.Sleepinstead ofselectonctx.Done()cmd/andpkg/linters/Representative diagnostics
pkg/cli/mcp_inspect_mcp_scripts_server.go:69: defer inside looppkg/cli/logs_orchestrator.go:151:buildContinuationIfNeededhas 11 parameters (limit: 8)pkg/workflow/action_resolver.go:map[string]boolused as a setpkg/workflow/frontmatter_error.go: redundant.Error()callpkg/cli/logs_awinfo_backward_compat_test.go: discardedjson.Unmarshalerrorpkg/cli/mcp_inspect.go: useselectwithctx.Done()instead oftime.SleepExpected outcome
Resolve a coherent subset of these targeted findings with minimal edits and no behavioral regressions.
Remediation checklist
make golint-custom.Suggested starting slice
defer-in-loop and excessive-parameter findings firstpkg/workflow/pkg/clilong-function work to [lint-monster] lint-monster: function-length refactoring backlog #42880Copilot execution notes
Use only the minimum relevant guidance: keep remediation tightly scoped to the assigned group, prefer direct local fixes over abstraction, and stop after
make golint-customconfirms the touched diagnostics are addressed.