[PR #608] [MERGED] ci(lint): enable errorlint linter (phase 3) #652

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/608
Author: @rudrankriyam
Created: 2/17/2026
Status: Merged
Merged: 2/17/2026
Merged by: @rudrankriyam

Base: mainHead: ci/enable-errorlint-linter


📝 Commits (1)

  • 140e2c3 ci(lint): enable errorlint linter (phase 3 of #602)

📊 Changes

23 files changed (+193 additions, -177 deletions)

View changed files

📝 .golangci.yml (+1 -0)
📝 cmd/run.go (+1 -1)
📝 internal/asc/client_test.go (+2 -2)
📝 internal/asc/notary.go (+2 -2)
📝 internal/auth/keychain.go (+10 -10)
📝 internal/cli/alternativedistribution/alternative_distribution_test.go (+25 -24)
📝 internal/cli/apps/app_setup_test.go (+7 -6)
📝 internal/cli/backgroundassets/background_assets_test.go (+18 -17)
📝 internal/cli/builds/builds_latest_test.go (+6 -5)
📝 internal/cli/bundleids/bundle_ids_test.go (+12 -11)
📝 internal/cli/certificates/certificates_test.go (+9 -8)
📝 internal/cli/completion/completion_test.go (+3 -2)
📝 internal/cli/devices/devices_test.go (+7 -6)
📝 internal/cli/marketplace/marketplace_test.go (+18 -17)
📝 internal/cli/preorders/pre_orders_test.go (+10 -9)
📝 internal/cli/pricing/pricing_test.go (+14 -13)
📝 internal/cli/profiles/profiles_test.go (+13 -12)
📝 internal/cli/users/users_test.go (+17 -16)
📝 internal/cli/versions/phased_release_test.go (+11 -10)
📝 internal/cli/versions/versions_release_test.go (+3 -2)

...and 3 more files

📄 Description

Summary

Enables the errorlint golangci-lint linter as phase 3 of #602, completing all three phases.

All fixes are mechanical with no behavioral changes:

  • errors.Is() instead of ==/!= for sentinel error comparisons (flag.ErrHelp, config.ErrNotFound, wantErr in tests)
  • %w instead of %v when wrapping errors with fmt.Errorf (notary abort errors, keychain access denied, config validation, generate-app restore)

Files changed (23 total)

Category Files Fix
Production code cmd/run.go, internal/asc/notary.go, internal/auth/keychain.go, internal/config/config.go, tools/generate-app/main.go errors.Is() + %w wrapping
Test files internal/asc/client_test.go, internal/config/config_test.go, + 11 CLI test files errors.Is() for flag.ErrHelp and sentinel errors

Checks run

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

Completes #602 (all three phases: misspell, unparam, errorlint).


🔄 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/608 **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-errorlint-linter` --- ### 📝 Commits (1) - [`140e2c3`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/140e2c3e1ce5573310ab17bb6fea2fbca83f0fa0) ci(lint): enable errorlint linter (phase 3 of #602) ### 📊 Changes **23 files changed** (+193 additions, -177 deletions) <details> <summary>View changed files</summary> 📝 `.golangci.yml` (+1 -0) 📝 `cmd/run.go` (+1 -1) 📝 `internal/asc/client_test.go` (+2 -2) 📝 `internal/asc/notary.go` (+2 -2) 📝 `internal/auth/keychain.go` (+10 -10) 📝 `internal/cli/alternativedistribution/alternative_distribution_test.go` (+25 -24) 📝 `internal/cli/apps/app_setup_test.go` (+7 -6) 📝 `internal/cli/backgroundassets/background_assets_test.go` (+18 -17) 📝 `internal/cli/builds/builds_latest_test.go` (+6 -5) 📝 `internal/cli/bundleids/bundle_ids_test.go` (+12 -11) 📝 `internal/cli/certificates/certificates_test.go` (+9 -8) 📝 `internal/cli/completion/completion_test.go` (+3 -2) 📝 `internal/cli/devices/devices_test.go` (+7 -6) 📝 `internal/cli/marketplace/marketplace_test.go` (+18 -17) 📝 `internal/cli/preorders/pre_orders_test.go` (+10 -9) 📝 `internal/cli/pricing/pricing_test.go` (+14 -13) 📝 `internal/cli/profiles/profiles_test.go` (+13 -12) 📝 `internal/cli/users/users_test.go` (+17 -16) 📝 `internal/cli/versions/phased_release_test.go` (+11 -10) 📝 `internal/cli/versions/versions_release_test.go` (+3 -2) _...and 3 more files_ </details> ### 📄 Description ## Summary Enables the `errorlint` golangci-lint linter as phase 3 of #602, completing all three phases. All fixes are mechanical with no behavioral changes: - **`errors.Is()` instead of `==`/`!=`** for sentinel error comparisons (`flag.ErrHelp`, `config.ErrNotFound`, `wantErr` in tests) - **`%w` instead of `%v`** when wrapping errors with `fmt.Errorf` (notary abort errors, keychain access denied, config validation, generate-app restore) ### Files changed (23 total) | Category | Files | Fix | |----------|-------|-----| | Production code | `cmd/run.go`, `internal/asc/notary.go`, `internal/auth/keychain.go`, `internal/config/config.go`, `tools/generate-app/main.go` | `errors.Is()` + `%w` wrapping | | Test files | `internal/asc/client_test.go`, `internal/config/config_test.go`, + 11 CLI test files | `errors.Is()` for `flag.ErrHelp` and sentinel errors | ## Checks run - `make format` — clean - `make lint` — passes with `errorlint` enabled - `ASC_BYPASS_KEYCHAIN=1 make test` — all tests pass Completes #602 (all three phases: misspell, unparam, errorlint). --- <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#652
No description provided.