Overview › Code Complexity & Hot Files

Code Complexity & Hot Files

iOS-specific report.

Source: codebase scan · 2026-05-07

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)

AreaFile / moduleReason
SDUI mappersCostcoContentstack ProductCard / AdView mappersServer-driven UI shape; large transformations
NetworkingCostcoNetworkClient.swiftRetry, pinning, error mapping in one client
CartCartViewModel.swiftMulti-step state machine
GeofencingMyWarehouseAndDeliveryStateManager.swiftMultiple try! regex compilations + state
CookiesCookiesManager.swift5s polling timer + observers
Web bridgeGenericWebBrowserViewController.swiftToken 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