[GH-ISSUE #544] Maintenance bloat audit and cleanup roadmap #149

Closed
opened 2026-02-26 21:33:47 +03:00 by kerem · 1 comment
Owner

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

  • High: Massive repeated CLI command boilerplate

    • Across internal/cli, rough counts:
      • shared.GetASCClient(...): 895
      • shared.ContextWithTimeout(...): 839
      • shared.PrintOutput(...): 1190
      • output flag declarations: 883
      • pretty flag declarations: 896
    • This is a lot of copy/paste maintenance surface.
  • Medium: Duplicated polling loops

    • Similar ticker/select polling implementations in:
      • internal/asc/client_publish.go
      • internal/cli/shared/build_wait.go
      • internal/cli/assets/assets_helpers.go
      • internal/cli/xcodecloud/xcode_cloud_helpers.go
    • Should be a shared poll helper to reduce drift and bugs.
  • Medium: Duplicate secure file-open logic

    • Two parallel implementations exist:
      • internal/asc/secure_open_unix.go + internal/asc/secure_open_other.go
      • internal/cli/shared/secure_open_unix.go + internal/cli/shared/secure_open_other.go
    • Security-sensitive logic duplicated in two places is risky.
  • Medium: internal/asc/output_registry_init.go is very large and repetitive

    • 819 lines with 462 registerRows(...) registrations.
    • Maintains many manual single-vs-list adapters; good candidate for a generator/helper pattern.
  • Low/Medium: repeated config loads

    • internal/asc/client_core.go calls loadConfig() in multiple resolve functions; likely unnecessary repeated disk/JSON work in one process.

Big file hotspots (bloat-prone)

  • internal/asc/client_http_test.go (9140 lines)
  • internal/cli/cmdtest/commands_test.go (5481 lines)
  • internal/asc/output_test.go (4669 lines)
  • internal/asc/client_options.go (3530 lines)

What looks lean (not bloaty)

  • internal/update/* is well split and relatively clean.
  • internal/validation/* is mostly straightforward.
Originally created by @rudrankriyam on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/544 - **High: Massive repeated CLI command boilerplate** - Across `internal/cli`, rough counts: - `shared.GetASCClient(...)`: `895` - `shared.ContextWithTimeout(...)`: `839` - `shared.PrintOutput(...)`: `1190` - `output` flag declarations: `883` - `pretty` flag declarations: `896` - This is a lot of copy/paste maintenance surface. - **Medium: Duplicated polling loops** - Similar ticker/select polling implementations in: - `internal/asc/client_publish.go` - `internal/cli/shared/build_wait.go` - `internal/cli/assets/assets_helpers.go` - `internal/cli/xcodecloud/xcode_cloud_helpers.go` - Should be a shared poll helper to reduce drift and bugs. - **Medium: Duplicate secure file-open logic** - Two parallel implementations exist: - `internal/asc/secure_open_unix.go` + `internal/asc/secure_open_other.go` - `internal/cli/shared/secure_open_unix.go` + `internal/cli/shared/secure_open_other.go` - Security-sensitive logic duplicated in two places is risky. - **Medium: `internal/asc/output_registry_init.go` is very large and repetitive** - `819` lines with `462` `registerRows(...)` registrations. - Maintains many manual single-vs-list adapters; good candidate for a generator/helper pattern. - **Low/Medium: repeated config loads** - `internal/asc/client_core.go` calls `loadConfig()` in multiple resolve functions; likely unnecessary repeated disk/JSON work in one process. ## Big file hotspots (bloat-prone) - `internal/asc/client_http_test.go` (`9140` lines) - `internal/cli/cmdtest/commands_test.go` (`5481` lines) - `internal/asc/output_test.go` (`4669` lines) - `internal/asc/client_options.go` (`3530` lines) ## What looks lean (not bloaty) - `internal/update/*` is well split and relatively clean. - `internal/validation/*` is mostly straightforward.
kerem closed this issue 2026-02-26 21:33:48 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Feb 14, 2026):

Implemented via #545 and merged to main in commit 8df0cc3.

<!-- gh-comment-id:3902254850 --> @rudrankriyam commented on GitHub (Feb 14, 2026): Implemented via #545 and merged to main in commit 8df0cc3.
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#149
No description provided.