Skip to content

[lint-monster] Handle unchecked and discarded results #67087

Description

@github-actions

Summary

The current make golint-custom run reports 951 unchecked or discarded result findings across 154 files: 776 unchecked fmt write errors, 151 discarded type assertion ok values, 10 assignments that discard both results, 9 scanner loops missing Err() checks, and 5 explicitly discarded Close() errors. Representative paths include pkg/console, pkg/parser, pkg/cli, and pkg/workflow.

Remediation checklist

  • Inspect each finding in its enclosing function and handle the result according to that function's existing error-reporting contract.
  • Check Scanner.Err() after each scan loop and propagate or report read failures.
  • Handle cleanup errors without masking an earlier operation error; remove only truly unnecessary blank assignments.
  • Use single-value type assertions when the type is guaranteed, otherwise check and handle the ok value.
  • Keep edits minimal and limited to this finding group. Run make golint-custom and report the updated group count plus any diagnostics requiring separate work.

Expected outcome

The assigned unchecked or discarded results are handled explicitly while preserving normal behavior, and the custom linter confirms this group is clean.

Generated by 🧌 LintMonster · codex · gpt60 · 179.3 AIC · ⌖ 28.8 AIC · ⊞ 15.5K · ◷

  • expires on Oct 15, 2026, 7:00 PM UTC-08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions