[GH-ISSUE #602] ci(lint): phase in stricter golangci-lint linters (errorlint/misspell/unparam) #169

Closed
opened 2026-02-26 21:33:53 +03:00 by kerem · 0 comments
Owner

Originally created by @rudrankriyam on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/602

Context

We added a baseline .golangci.yml to keep linting consistent and enforce core Go hygiene (govet, staticcheck, stylecheck for ST1005, errcheck, unused, etc.).

Turning on additional linters immediately causes large repo-wide cleanup ("churn"). This issue tracks a phased rollout to tighten linting without a massive, hard-to-review PR.

Goal

Incrementally enable additional linters in a way that is:

  • reviewable (small diffs)
  • low-conflict (touch fewer files per PR)
  • CI-safe (no sudden failures on unrelated PRs)

Proposed rollout (phased)

Phase 1: misspell

  • Enable misspell.
  • Add ignore list for intentional/API spellings (e.g. cancelled, cancelling) and domain words.
  • Fix any true typos that remain.

Acceptance criteria:

  • make lint passes in CI.
  • No renames of JSON tags/ASC fields that would break output compatibility.

Phase 2: unparam

  • Enable unparam.
  • Address low-risk cases first:
    • remove unused parameters
    • simplify helpers where the parameter is constant
  • Skip/refactor only where it improves clarity; avoid "refactor for the linter".

Acceptance criteria:

  • make lint passes.
  • ASC_BYPASS_KEYCHAIN=1 make test passes.

Phase 3: errorlint

  • Enable errorlint with a staged approach:
    • start by excluding _test.go if necessary (reduce initial blast radius)
    • fix production code first: errors.Is/As, correct %w wrapping, avoid == with sentinel errors
    • then include tests and fix remaining comparisons

Acceptance criteria:

  • make lint passes with errorlint enabled.
  • No behavioral regressions (tests remain green).

Non-goals (for now)

  • Enforcing stylecheck ST1003 naming rules that would require package renames (e.g. app_events). That can be tracked separately if ever desired.

Notes

  • Keep changes split into multiple PRs (one linter per PR), or even sub-PRs if needed.
  • Prefer targeted excludes/ignores over renaming exported/publicly-consumed fields.
Originally created by @rudrankriyam on GitHub (Feb 17, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/602 ## Context We added a baseline `.golangci.yml` to keep linting consistent and enforce core Go hygiene (`govet`, `staticcheck`, `stylecheck` for ST1005, `errcheck`, `unused`, etc.). Turning on additional linters immediately causes large repo-wide cleanup ("churn"). This issue tracks a phased rollout to tighten linting without a massive, hard-to-review PR. ## Goal Incrementally enable additional linters in a way that is: - reviewable (small diffs) - low-conflict (touch fewer files per PR) - CI-safe (no sudden failures on unrelated PRs) ## Proposed rollout (phased) ### Phase 1: `misspell` - Enable `misspell`. - Add ignore list for intentional/API spellings (e.g. `cancelled`, `cancelling`) and domain words. - Fix any true typos that remain. Acceptance criteria: - `make lint` passes in CI. - No renames of JSON tags/ASC fields that would break output compatibility. ### Phase 2: `unparam` - Enable `unparam`. - Address low-risk cases first: - remove unused parameters - simplify helpers where the parameter is constant - Skip/refactor only where it improves clarity; avoid "refactor for the linter". Acceptance criteria: - `make lint` passes. - `ASC_BYPASS_KEYCHAIN=1 make test` passes. ### Phase 3: `errorlint` - Enable `errorlint` with a staged approach: - start by excluding `_test.go` if necessary (reduce initial blast radius) - fix production code first: `errors.Is/As`, correct `%w` wrapping, avoid `==` with sentinel errors - then include tests and fix remaining comparisons Acceptance criteria: - `make lint` passes with `errorlint` enabled. - No behavioral regressions (tests remain green). ## Non-goals (for now) - Enforcing `stylecheck` ST1003 naming rules that would require package renames (e.g. `app_events`). That can be tracked separately if ever desired. ## Notes - Keep changes split into multiple PRs (one linter per PR), or even sub-PRs if needed. - Prefer targeted excludes/ignores over renaming exported/publicly-consumed fields.
kerem 2026-02-26 21:33:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#169
No description provided.