Skip to content

Reduce errcheck exclusions #49

@satococoa

Description

@satococoa

Summary

.golangci.yml currently disables errcheck warnings for most fmt/os functions:

errcheck:
  exclude-functions:
    - fmt.Fprint
    - fmt.Fprintf
    - fmt.Fprintln
    - fmt.Print
    - fmt.Printf
    - fmt.Println
    - os.Setenv
    - os.Unsetenv

With these exclusions, errcheck rarely reports ignored errors. Only a handful of UI-friendly prints need special handling.

Desired outcome

  • Remove the blanket errcheck exclusions.
  • Update call sites to explicitly handle or ignore returned errors.
  • Keep errcheck effective so real issues are surfaced.

Notes

  • Most print helpers target os.Stdout/os.Stderr; assigning to _ or wrapping helpers should be enough.
  • This is lint/code-cleanup only; no CLI behaviour changes are expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions