Remove golangci-lint ireturn Directives · Entire

What would it take to get rid of all //nolint:ireturn directives?

Not a refactor at all — it's a config decision. The 7 directives can't (and shouldn't) be refactored away by changing return types; the right move is either disable ireturn (kills the fight permanently) or convert the 7 inline directives into allow-list entries (keeps the linter for new code). Both are small config edits.

Why "refactor to concrete types" is the wrong path

I looked at all 7. None are accidental — they're either framework-forced or deliberate abstraction boundaries:

Changing these to concrete returns is impossible for the first two and actively harms the design for the rest. So refactoring is off the table.

The actual fight you're hitting

buildSummaryGenerator is the tell. summarize.Generator is already in the allow-list (.golangci.yaml:118), so ireturn shouldn't fire — yet the directive exists. Its own comment says it: ireturn fires in some linter versions, and when it doesn't, nolintlint (you have require-explanation + require-specific on) flags the directive as unused. Version-dependent whack-a-mole. That's the loop you hate.

Two clean options

Option A — disable ireturn (smallest, ends it for good)

Option B — keep the linter, kill the inline directives

My recommendation: Option B if you still want the discipline on new code, Option A if you (like most people) think ireturn is more noise than signal. Either is ~10 minutes and I can verify with mise run lint after.

Done

Option B implemented — all 7 //nolint:ireturn directives gone, linter still enabled.