Overview › Code Complexity & Hot Files
Code Complexity & Hot Files
iOS-specific report.
Executive summary
The largest files in the iOS project concentrate in CostcoContentstack (mappers, ViewModels), and the legacy Costco/Costco/ tree (Obj-C utility classes, view controllers). Without a SwiftLint complexity baseline, file growth goes unnoticed.
Suspected hot files (qualitative — confirm with line counts)
| Area | File / module | Reason |
|---|---|---|
| SDUI mappers | CostcoContentstack ProductCard / AdView mappers | Server-driven UI shape; large transformations |
| Networking | CostcoNetworkClient.swift | Retry, pinning, error mapping in one client |
| Cart | CartViewModel.swift | Multi-step state machine |
| Geofencing | MyWarehouseAndDeliveryStateManager.swift | Multiple try! regex compilations + state |
| Cookies | CookiesManager.swift | 5s polling timer + observers |
| Web bridge | GenericWebBrowserViewController.swift | Token handling + URL handling |
Findings
MEDIUM
SwiftLint complexity rules unconfirmed
Without enforced rules, file size and function complexity drift.
Recommendation: Set
file_length, function_body_length, type_body_length, cyclomatic_complexity with reasonable thresholds. Generate baseline; fail PRs that exceed.LOW
Periphery for dead code
Run periphery quarterly to identify unused code.
Costco iOS · Code Review Report · Generated 2026-05-07 · 88 machine-curated findings