[PR #607] [MERGED] ci(lint): enable unparam linter (phase 2) #650

Closed
opened 2026-02-26 22:31:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/607
Author: @rudrankriyam
Created: 2/17/2026
Status: Merged
Merged: 2/17/2026
Merged by: @rudrankriyam

Base: mainHead: ci/enable-unparam-linter


📝 Commits (1)

  • 93463a7 ci(lint): enable unparam linter (phase 2 of #602)

📊 Changes

26 files changed (+95 additions, -133 deletions)

View changed files

📝 .golangci.yml (+1 -3)
asc-downloads.png (+0 -0)
📝 internal/asc/analytics.go (+1 -1)
📝 internal/asc/analytics_test.go (+6 -6)
📝 internal/asc/client_http.go (+2 -2)
📝 internal/asc/client_http_test.go (+3 -3)
📝 internal/asc/client_performance.go (+5 -5)
📝 internal/asc/finance.go (+1 -1)
📝 internal/asc/finance_test.go (+1 -1)
📝 internal/asc/notary.go (+6 -18)
📝 internal/asc/offer_codes.go (+2 -2)
📝 internal/asc/output_registry_test.go (+6 -5)
📝 internal/auth/keychain.go (+6 -9)
📝 internal/cli/cmdtest/profiles_local_test.go (+9 -7)
📝 internal/cli/gamecenter/game_center_details.go (+2 -2)
📝 internal/cli/gamecenter/game_center_matchmaking.go (+9 -9)
📝 internal/cli/notify/notify_test.go (+8 -8)
📝 internal/cli/shared/localizations.go (+3 -3)
📝 internal/cli/subscriptions/helpers.go (+6 -15)
📝 internal/cli/subscriptions/helpers_more_test.go (+7 -7)

...and 6 more files

📄 Description

Summary

Enables the unparam golangci-lint linter as phase 2 of #602.

Fixes all 14 violations across 10 files — all mechanical simplifications with no behavioral changes:

  • Removed unused parametersctx, method, status, teamID, bundleID, body that always received the same value
  • Simplified return signatures — dropped always-nil error returns from signS3Request, selectCredential, withDefaults
  • Removed redundant custom max() — Go 1.21+ builtin handles it
  • Hardcoded constantsrequired=true in subscription helpers, minColumns=2 in test helper

Files changed

File Fix
internal/asc/analytics_test.go rawResponse — removed always-200 status param
internal/asc/client_http.go doStream — removed always-GET method and always-nil body
internal/asc/notary.go signS3Request — removed always-nil error return
internal/asc/output_registry_test.go assertRowContains — hardcoded minColumns=2
internal/auth/keychain.go selectCredential — removed always-nil error return
internal/cli/cmdtest/profiles_local_test.go buildMobileprovision — hardcoded teamID and bundleID
internal/cli/gamecenter/game_center_*.go ascClient — removed unused ctx param
internal/cli/notify/notify_test.go captureOutput — removed never-used stdout return
internal/cli/shared/localizations.go uploadLocalizationValues — removed unused ctx param
internal/cli/subscriptions/helpers.go 3 normalizers — removed always-true required param
internal/screenshots/frame_test.go Removed custom max() (Go builtin)
internal/update/update.go, check.go withDefaults — removed always-nil error return

Checks run

  • make format — clean
  • make lint — passes with unparam enabled
  • ASC_BYPASS_KEYCHAIN=1 make test — all tests pass

Closes phase 2 of #602.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/607 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/17/2026 **Status:** ✅ Merged **Merged:** 2/17/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `ci/enable-unparam-linter` --- ### 📝 Commits (1) - [`93463a7`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/93463a7adf5bb324c99ce7774ed295b7c4e271ae) ci(lint): enable unparam linter (phase 2 of #602) ### 📊 Changes **26 files changed** (+95 additions, -133 deletions) <details> <summary>View changed files</summary> 📝 `.golangci.yml` (+1 -3) ➕ `asc-downloads.png` (+0 -0) 📝 `internal/asc/analytics.go` (+1 -1) 📝 `internal/asc/analytics_test.go` (+6 -6) 📝 `internal/asc/client_http.go` (+2 -2) 📝 `internal/asc/client_http_test.go` (+3 -3) 📝 `internal/asc/client_performance.go` (+5 -5) 📝 `internal/asc/finance.go` (+1 -1) 📝 `internal/asc/finance_test.go` (+1 -1) 📝 `internal/asc/notary.go` (+6 -18) 📝 `internal/asc/offer_codes.go` (+2 -2) 📝 `internal/asc/output_registry_test.go` (+6 -5) 📝 `internal/auth/keychain.go` (+6 -9) 📝 `internal/cli/cmdtest/profiles_local_test.go` (+9 -7) 📝 `internal/cli/gamecenter/game_center_details.go` (+2 -2) 📝 `internal/cli/gamecenter/game_center_matchmaking.go` (+9 -9) 📝 `internal/cli/notify/notify_test.go` (+8 -8) 📝 `internal/cli/shared/localizations.go` (+3 -3) 📝 `internal/cli/subscriptions/helpers.go` (+6 -15) 📝 `internal/cli/subscriptions/helpers_more_test.go` (+7 -7) _...and 6 more files_ </details> ### 📄 Description ## Summary Enables the `unparam` golangci-lint linter as phase 2 of #602. Fixes all 14 violations across 10 files — all mechanical simplifications with no behavioral changes: - **Removed unused parameters** — `ctx`, `method`, `status`, `teamID`, `bundleID`, `body` that always received the same value - **Simplified return signatures** — dropped always-nil error returns from `signS3Request`, `selectCredential`, `withDefaults` - **Removed redundant custom `max()`** — Go 1.21+ builtin handles it - **Hardcoded constants** — `required=true` in subscription helpers, `minColumns=2` in test helper ### Files changed | File | Fix | |------|-----| | `internal/asc/analytics_test.go` | `rawResponse` — removed always-200 `status` param | | `internal/asc/client_http.go` | `doStream` — removed always-GET `method` and always-nil `body` | | `internal/asc/notary.go` | `signS3Request` — removed always-nil error return | | `internal/asc/output_registry_test.go` | `assertRowContains` — hardcoded `minColumns=2` | | `internal/auth/keychain.go` | `selectCredential` — removed always-nil error return | | `internal/cli/cmdtest/profiles_local_test.go` | `buildMobileprovision` — hardcoded `teamID` and `bundleID` | | `internal/cli/gamecenter/game_center_*.go` | `ascClient` — removed unused `ctx` param | | `internal/cli/notify/notify_test.go` | `captureOutput` — removed never-used stdout return | | `internal/cli/shared/localizations.go` | `uploadLocalizationValues` — removed unused `ctx` param | | `internal/cli/subscriptions/helpers.go` | 3 normalizers — removed always-true `required` param | | `internal/screenshots/frame_test.go` | Removed custom `max()` (Go builtin) | | `internal/update/update.go`, `check.go` | `withDefaults` — removed always-nil error return | ## Checks run - `make format` — clean - `make lint` — passes with `unparam` enabled - `ASC_BYPASS_KEYCHAIN=1 make test` — all tests pass Closes phase 2 of #602. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:31:57 +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#650
No description provided.