Summary
Custom lint scan found 77 targeted findings outside the shared function-length backlog. These combine a small number of non-shared long functions with several narrow lint categories that are suitable for one focused cleanup pass.
Included root causes
defer inside loop causing delayed cleanup
- discarded
json.Unmarshal errors
map[string]bool used as a set
- redundant
.Error() in formatting
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 long functions in
cmd/gh-aw and pkg/linters
Representative diagnostics
pkg/cli/mcp_inspect_mcp_scripts_server.go:69: defer inside loop
pkg/cli/logs_awinfo_backward_compat_test.go:173: discarded json.Unmarshal error
pkg/workflow/action_resolver.go:38: map[string]bool used as a set
pkg/workflow/frontmatter_error.go:136: redundant .Error() call
pkg/workflow/codex_logs.go:17: use strings.Count(...)+1
pkg/cli/mcp_inspect.go:138: 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
Notes for the agent
This issue intentionally excludes the shared function-length refactoring backlog in pkg/workflow and pkg/cli.
Generated by 🧌 LintMonster · 31.5 AIC · ⌖ 22.3 AIC · ⊞ 4.4K · ◷
Summary
Custom lint scan found 77 targeted findings outside the shared function-length backlog. These combine a small number of non-shared long functions with several narrow lint categories that are suitable for one focused cleanup pass.
Included root causes
deferinside loop causing delayed cleanupjson.Unmarshalerrorsmap[string]boolused as a set.Error()in formattinglen(s) > 0instead ofs != ""len(strings.Split(...))count anti-patternsort.Slicewhereslices.SortFuncis preferredtime.Sleepinstead ofselectonctx.Done()cmd/gh-awandpkg/lintersRepresentative diagnostics
pkg/cli/mcp_inspect_mcp_scripts_server.go:69: defer inside looppkg/cli/logs_awinfo_backward_compat_test.go:173: discardedjson.Unmarshalerrorpkg/workflow/action_resolver.go:38:map[string]boolused as a setpkg/workflow/frontmatter_error.go:136: redundant.Error()callpkg/workflow/codex_logs.go:17: usestrings.Count(...)+1pkg/cli/mcp_inspect.go:138: 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 discarded-unmarshal findings firstNotes for the agent
This issue intentionally excludes the shared
function-length refactoringbacklog inpkg/workflowandpkg/cli.