Public report of RevenueCat/purchases-ios, published 6 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 6 November 2026, 15:03 UTC · Survey ID cd_c3890a2c429643b99b4b633c3710f157
RevenueCat/purchases-ios
Measured 6 November 2026, 15:02 UTC, at code version 0ab6c0f
First survey, so nothing to compare with yet
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 158,820 lines of product code in 13 projects, tests not counted · Estimated rebuild effort: about 2.9 person-years · Weakest lens: Code Health, 62
Findings by how serious they are
26 critical543 serious133 minor
15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
6 November 2026, 15:02 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
67of 67 dimensions measured by tools.
673of 702 findings point to an exact file and line, so you can open each one in the code. The other 29 concern the repository as a whole, such as missing documentation.
67dimensions across 9 lenses, read from 158,820 lines of product code in 13 projects.
RevenueCat/purchases-ios falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 64 out of 100 and is rated Adequate, and 15 of its 26 critical findings are security problems.
Code Health, at 62, is the weakest lens, level with Production Readiness, and counts most in the score. The best first step is recording design decisions, worth about 1 point. Adopting a type checker would lift Code Health itself, also worth about 1.
Eleven pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two places in the code run text as code, which an attacker could use, and three sets of files in separate parts keep changing together, which points to hidden dependencies. Pinning each tool to an exact version, replacing text run as code with direct calls and making the hidden dependencies explicit would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions. Moving the business rules into the object that owns the data would take care of the four business objects that only hold data.
The product code is 158,820 lines, about €420,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
The weakest lenses score close to each other, so improving any of them moves the score.
Code composition: what the lines of code are
Product code 44%Tests 56%
Rebuild cost: about €420,000 · Estimate
Cost to rebuild
€140,000 to €700,000, for 2,313 to 7,338 hours of work, about 2.9 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 64. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 158,820 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 1 point · Low effort · ADR Quality
2
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with AllAPITestsTests.swift.
Raises the score by about 0.7 points · Low effort · Test Quality
3
Resolve the 1 Banned license finding(s) in License Compliance.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €420,000 to build again, about 2.9 person-years of work. Its weakest lens is Code Health, at 62 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 1 point for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
36 modules, with 226 dependencies between them. One loop runs through 27 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
Authentication uses Error Handling, so a change to Error Handling can break Authentication, while a change to Authentication can't break Error Handling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→24 Authentication uses Networkingpart of a loop✕
Connections
2 pairs of types, where a type in Authentication uses a type in Networking.
Authentication uses FoundationExtensions, so a change to FoundationExtensions can break Authentication, while a change to Authentication can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
36 pairs of types, where a type in Logging uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
OfflineEntitlements uses Purchasing, so a change to Purchasing can break OfflineEntitlements, while a change to OfflineEntitlements can't break Purchasing.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→17 OfflineEntitlements uses repositorypart of a loop✕
Connections
6 pairs of types, where a type in OfflineEntitlements uses a type in repository.
OfflineEntitlements uses repository, so a change to repository can break OfflineEntitlements, while a change to OfflineEntitlements can't break repository.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→20 OfflineEntitlements uses Error Handlingpart of a loop✕
Connections
1 pair of types, where a type in OfflineEntitlements uses a type in Error Handling.
OfflineEntitlements uses Error Handling, so a change to Error Handling can break OfflineEntitlements, while a change to OfflineEntitlements can't break Error Handling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→24 OfflineEntitlements uses Networkingpart of a loop✕
Connections
2 pairs of types, where a type in OfflineEntitlements uses a type in Networking.
OfflineEntitlements uses Networking, so a change to Networking can break OfflineEntitlements, while a change to OfflineEntitlements can't break Networking.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
OfflineEntitlements uses FoundationExtensions, so a change to FoundationExtensions can break OfflineEntitlements, while a change to OfflineEntitlements can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→33 OfflineEntitlements uses Cachingpart of a loop✕
Connections
2 pairs of types, where a type in OfflineEntitlements uses a type in Caching.
OfflineEntitlements uses Diagnostics, so a change to Diagnostics can break OfflineEntitlements, while a change to OfflineEntitlements can't break Diagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
67 pairs of types, where a type in Paywalls uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Paywalls uses FoundationExtensions, so a change to FoundationExtensions can break Paywalls, while a change to Paywalls can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
RulesEngine uses FoundationExtensions, so a change to FoundationExtensions can break RulesEngine, while a change to RulesEngine can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→17 Virtual Currencies uses repositorypart of a loop✕
Connections
3 pairs of types, where a type in Virtual Currencies uses a type in repository.
Virtual Currencies uses repository, so a change to repository can break Virtual Currencies, while a change to Virtual Currencies can't break repository.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→24 Virtual Currencies uses Networkingpart of a loop✕
Connections
4 pairs of types, where a type in Virtual Currencies uses a type in Networking.
Virtual Currencies uses Networking, so a change to Networking can break Virtual Currencies, while a change to Virtual Currencies can't break Networking.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
WebPurchaseRedemption uses repository, so a change to repository can break WebPurchaseRedemption, while a change to WebPurchaseRedemption can't break repository.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→24 WebPurchaseRedemption uses Networkingpart of a loop✕
Connections
1 pair of types, where a type in WebPurchaseRedemption uses a type in Networking.
WebPurchaseRedemption uses Networking, so a change to Networking can break WebPurchaseRedemption, while a change to WebPurchaseRedemption can't break Networking.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→27 WebPurchaseRedemption uses Identitypart of a loop✕
Connections
2 pairs of types, where a type in WebPurchaseRedemption uses a type in Identity.
WebPurchaseRedemption uses Identity, so a change to Identity can break WebPurchaseRedemption, while a change to WebPurchaseRedemption can't break Identity.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
LocalRules uses LocalReceiptParsing, so a change to LocalReceiptParsing can break LocalRules, while a change to LocalRules can't break LocalReceiptParsing.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
LocalRules uses FoundationExtensions, so a change to FoundationExtensions can break LocalRules, while a change to LocalRules can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
33 pairs of types, where a type in Support uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
2 pairs of types, where a type in Security uses a type in Misc.
The types involved
Security.Signing → Misc.ClockType
Security.VerificationResult → Misc.Transaction
Direction
Security uses Misc, so a change to Misc can break Security, while a change to Security can't break Misc.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→32 Security uses FoundationExtensionspart of a loop✕
Connections
1 pair of types, where a type in Security uses a type in FoundationExtensions.
The types involved
Security.Signing → FoundationExtensions.Date
Direction
Security uses FoundationExtensions, so a change to FoundationExtensions can break Security, while a change to Security can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Purchasing uses OfflineEntitlements, so a change to OfflineEntitlements can break Purchasing, while a change to Purchasing can't break OfflineEntitlements.
Position
Below the diagonal: Purchasing uses a module listed above it, which is the healthy direction.
Purchasing uses Virtual Currencies, so a change to Virtual Currencies can break Purchasing, while a change to Purchasing can't break Virtual Currencies.
Position
Below the diagonal: Purchasing uses a module listed above it, which is the healthy direction.
Purchasing uses WebPurchaseRedemption, so a change to WebPurchaseRedemption can break Purchasing, while a change to Purchasing can't break WebPurchaseRedemption.
Position
Below the diagonal: Purchasing uses a module listed above it, which is the healthy direction.
213 pairs of types, where a type in Purchasing uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Purchasing uses SubscriberAttributes, so a change to SubscriberAttributes can break Purchasing, while a change to Purchasing can't break SubscriberAttributes.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
119 pairs of types, where a type in Purchasing uses a type in Networking. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Purchasing uses LocalReceiptParsing, so a change to LocalReceiptParsing can break Purchasing, while a change to Purchasing can't break LocalReceiptParsing.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Purchasing uses CustomerCenter, so a change to CustomerCenter can break Purchasing, while a change to Purchasing can't break CustomerCenter.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→32 Purchasing uses FoundationExtensionspart of a loop✕
Connections
84 pairs of types, where a type in Purchasing uses a type in FoundationExtensions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Purchasing uses FoundationExtensions, so a change to FoundationExtensions can break Purchasing, while a change to Purchasing can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Checkpoints uses FoundationExtensions, so a change to FoundationExtensions can break Checkpoints, while a change to Checkpoints can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
197 pairs of types, where a type in repository uses a type in Paywalls. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository uses Virtual Currencies, so a change to Virtual Currencies can break repository, while a change to repository can't break Virtual Currencies.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
repository uses WebPurchaseRedemption, so a change to WebPurchaseRedemption can break repository, while a change to repository can't break WebPurchaseRedemption.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
166 pairs of types, where a type in repository uses a type in Purchasing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
203 pairs of types, where a type in repository uses a type in Networking. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository uses Networking, so a change to Networking can break repository, while a change to repository can't break Networking.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→25 repository uses LocalReceiptParsingpart of a loop✕
Connections
81 pairs of types, where a type in repository uses a type in LocalReceiptParsing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository uses LocalReceiptParsing, so a change to LocalReceiptParsing can break repository, while a change to repository can't break LocalReceiptParsing.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository uses Events, so a change to Events can break repository, while a change to repository can't break Events.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→31 repository uses CustomerCenterpart of a loop✕
Connections
69 pairs of types, where a type in repository uses a type in CustomerCenter. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository uses CustomerCenter, so a change to CustomerCenter can break repository, while a change to repository can't break CustomerCenter.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→32 repository uses FoundationExtensionspart of a loop✕
Connections
80 pairs of types, where a type in repository uses a type in FoundationExtensions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository uses FoundationExtensions, so a change to FoundationExtensions can break repository, while a change to repository can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
DeepLink uses WebPurchaseRedemption, so a change to WebPurchaseRedemption can break DeepLink, while a change to DeepLink can't break WebPurchaseRedemption.
Position
Below the diagonal: DeepLink uses a module listed above it, which is the healthy direction.
AdapterSDKs~RevenueCatAds~RevenueCatAds uses repository, so a change to repository can break AdapterSDKs~RevenueCatAds~RevenueCatAds, while a change to AdapterSDKs~RevenueCatAds~RevenueCatAds can't break repository.
Position
Below the diagonal: AdapterSDKs~RevenueCatAds~RevenueCatAds uses a module listed above it, which is the healthy direction.
AdapterSDKs~RevenueCatAds~RevenueCatAds uses Error Handling, so a change to Error Handling can break AdapterSDKs~RevenueCatAds~RevenueCatAds, while a change to AdapterSDKs~RevenueCatAds~RevenueCatAds can't break Error Handling.
Position
Below the diagonal: AdapterSDKs~RevenueCatAds~RevenueCatAds uses a module listed above it, which is the healthy direction.
SubscriberAttributes uses repository, so a change to repository can break SubscriberAttributes, while a change to SubscriberAttributes can't break repository.
Position
Below the diagonal: SubscriberAttributes uses a module listed above it, which is the healthy direction.
SubscriberAttributes uses Error Handling, so a change to Error Handling can break SubscriberAttributes, while a change to SubscriberAttributes can't break Error Handling.
Position
Below the diagonal: SubscriberAttributes uses a module listed above it, which is the healthy direction.
22→23 SubscriberAttributes uses Attributionpart of a loop✕
Connections
3 pairs of types, where a type in SubscriberAttributes uses a type in Attribution.
SubscriberAttributes uses Attribution, so a change to Attribution can break SubscriberAttributes, while a change to SubscriberAttributes can't break Attribution.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→24 SubscriberAttributes uses Networkingpart of a loop✕
Connections
3 pairs of types, where a type in SubscriberAttributes uses a type in Networking.
SubscriberAttributes uses Networking, so a change to Networking can break SubscriberAttributes, while a change to SubscriberAttributes can't break Networking.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→26 SubscriberAttributes uses Miscpart of a loop✕
Connections
3 pairs of types, where a type in SubscriberAttributes uses a type in Misc.
SubscriberAttributes uses FoundationExtensions, so a change to FoundationExtensions can break SubscriberAttributes, while a change to SubscriberAttributes can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→33 SubscriberAttributes uses Cachingpart of a loop✕
Connections
1 pair of types, where a type in SubscriberAttributes uses a type in Caching.
Attribution uses SubscriberAttributes, so a change to SubscriberAttributes can break Attribution, while a change to Attribution can't break SubscriberAttributes.
Position
Below the diagonal: Attribution uses a module listed above it, which is the healthy direction.
Networking uses OfflineEntitlements, so a change to OfflineEntitlements can break Networking, while a change to Networking can't break OfflineEntitlements.
Position
Below the diagonal: Networking uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in Networking uses a type in Purchasing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
277 pairs of types, where a type in Networking uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Networking uses LocalReceiptParsing, so a change to LocalReceiptParsing can break Networking, while a change to Networking can't break LocalReceiptParsing.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Networking uses CustomerCenter, so a change to CustomerCenter can break Networking, while a change to Networking can't break CustomerCenter.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→32 Networking uses FoundationExtensionspart of a loop✕
Connections
95 pairs of types, where a type in Networking uses a type in FoundationExtensions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Networking uses FoundationExtensions, so a change to FoundationExtensions can break Networking, while a change to Networking can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27 pairs of types, where a type in LocalReceiptParsing uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
LocalReceiptParsing uses repository, so a change to repository can break LocalReceiptParsing, while a change to LocalReceiptParsing can't break repository.
Position
Below the diagonal: LocalReceiptParsing uses a module listed above it, which is the healthy direction.
LocalReceiptParsing uses Networking, so a change to Networking can break LocalReceiptParsing, while a change to LocalReceiptParsing can't break Networking.
Position
Below the diagonal: LocalReceiptParsing uses a module listed above it, which is the healthy direction.
25→32 LocalReceiptParsing uses FoundationExtensionspart of a loop✕
Connections
5 pairs of types, where a type in LocalReceiptParsing uses a type in FoundationExtensions.
LocalReceiptParsing uses FoundationExtensions, so a change to FoundationExtensions can break LocalReceiptParsing, while a change to LocalReceiptParsing can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Misc uses LocalReceiptParsing, so a change to LocalReceiptParsing can break Misc, while a change to Misc can't break LocalReceiptParsing.
Position
Below the diagonal: Misc uses a module listed above it, which is the healthy direction.
26→32 Misc uses FoundationExtensionspart of a loop✕
Connections
26 pairs of types, where a type in Misc uses a type in FoundationExtensions. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Identity uses FoundationExtensions, so a change to FoundationExtensions can break Identity, while a change to Identity can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp uses repository, so a change to repository can break Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp, while a change to Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp can't break repository.
Position
Below the diagonal: Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp uses a module listed above it, which is the healthy direction.
Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp uses Misc, so a change to Misc can break Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp, while a change to Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp can't break Misc.
Position
Below the diagonal: Projects~AutomatedSDKTestsApp~AutomatedSDKTestsApp~AutomatedSDKTestsApp uses a module listed above it, which is the healthy direction.
Projects~SDKUpdateTester uses repository, so a change to repository can break Projects~SDKUpdateTester, while a change to Projects~SDKUpdateTester can't break repository.
Position
Below the diagonal: Projects~SDKUpdateTester uses a module listed above it, which is the healthy direction.
Projects~SDKUpdateTester uses Identity, so a change to Identity can break Projects~SDKUpdateTester, while a change to Projects~SDKUpdateTester can't break Identity.
Position
Below the diagonal: Projects~SDKUpdateTester uses a module listed above it, which is the healthy direction.
41 pairs of types, where a type in CustomerCenter uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
CustomerCenter uses FoundationExtensions, so a change to FoundationExtensions can break CustomerCenter, while a change to CustomerCenter can't break FoundationExtensions.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
FoundationExtensions uses Purchasing, so a change to Purchasing can break FoundationExtensions, while a change to FoundationExtensions can't break Purchasing.
Position
Below the diagonal: FoundationExtensions uses a module listed above it, which is the healthy direction.
FoundationExtensions uses repository, so a change to repository can break FoundationExtensions, while a change to FoundationExtensions can't break repository.
Position
Below the diagonal: FoundationExtensions uses a module listed above it, which is the healthy direction.
FoundationExtensions uses Networking, so a change to Networking can break FoundationExtensions, while a change to FoundationExtensions can't break Networking.
Position
Below the diagonal: FoundationExtensions uses a module listed above it, which is the healthy direction.
FoundationExtensions uses LocalReceiptParsing, so a change to LocalReceiptParsing can break FoundationExtensions, while a change to FoundationExtensions can't break LocalReceiptParsing.
Position
Below the diagonal: FoundationExtensions uses a module listed above it, which is the healthy direction.
FoundationExtensions uses CustomerCenter, so a change to CustomerCenter can break FoundationExtensions, while a change to FoundationExtensions can't break CustomerCenter.
Position
Below the diagonal: FoundationExtensions uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in Caching uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Diagnostics uses LocalReceiptParsing, so a change to LocalReceiptParsing can break Diagnostics, while a change to Diagnostics can't break LocalReceiptParsing.
Position
Below the diagonal: Diagnostics uses a module listed above it, which is the healthy direction.
Diagnostics uses FoundationExtensions, so a change to FoundationExtensions can break Diagnostics, while a change to Diagnostics can't break FoundationExtensions.
Position
Below the diagonal: Diagnostics uses a module listed above it, which is the healthy direction.
AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses Purchasing, so a change to Purchasing can break AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob, while a change to AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob can't break Purchasing.
Position
Below the diagonal: AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses repository, so a change to repository can break AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob, while a change to AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob can't break repository.
Position
Below the diagonal: AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses a module listed above it, which is the healthy direction.
AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses Networking, so a change to Networking can break AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob, while a change to AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob can't break Networking.
Position
Below the diagonal: AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses a module listed above it, which is the healthy direction.
AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses FoundationExtensions, so a change to FoundationExtensions can break AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob, while a change to AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob can't break FoundationExtensions.
Position
Below the diagonal: AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses a module listed above it, which is the healthy direction.
AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses Ads, so a change to Ads can break AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob, while a change to AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob can't break Ads.
Position
Below the diagonal: AdapterSDKs~RevenueCatAdMob~RevenueCatAdMob uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 62% · Adequate · gated by X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
17
High / Critical
A03:2025 — Software Supply Chain Failures
4
Medium
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality; Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raise allocation-aware density on the hot paths — currently 13 use(s) across 175,570 production line(s) (~0.1/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Test Quality: No assertions (empty test): testExample
Projects/PaywallsTester/Project.swift
6.7
Mixed
Explicit Debt: HackComment
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 26
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 543
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 133
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 67 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 67 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 673 of 702 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (codecov.yml) shows coverage is measured in your own CI. Commit the lcov/Cobertura report it produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift) and this repository declares a SwiftPM test suite (5 packages), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Swift Package.swift/Package.resolved, but the licence verdict published here was taken over its gem dependencies. Nothing was read about its SwiftPM dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Examples/SampleCat/SampleCat/Utils/Views/ConceptIntroductionView.swift`, `Examples/SampleCat/SampleCat/Utils/Views/ContentBackgroundView.swift`, `RevenueCatUI/Checkpoints/CheckpointsManager.swift`, `RevenueCatUI/CustomerCenter/Data/SemanticVersion.swift`, `RevenueCatUI/CustomerCenter/ViewModels/BaseManageSubscriptionViewModel.swift`, … (+18 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in Sources/Purchasing/Purchases/Purchases.swift, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (Tests/v4LoadShedderIntegration/v4LoadShedderIntegration.xcodeproj/project.pbxproj). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Swift, c is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Swift, c is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
20 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was VariablesV2.process at 107. A further 28 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being CommonLocalizedString.defaultValue at 133 — they are counted neither in the figure above nor in this dimension's score. 24 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Sources/CustomerCenter/CustomerCenterConfigData.swift (CommonLocalizedString.defaultValue at 133), RevenueCatUI/Data/Strings.swift (Strings.description at 111), Sources/Logging/Strings/StoreKitStrings.swift (StoreKitStrings.description at 56), Sources/Logging/Strings/PaywallsStrings.swift (PaywallsStrings.description at 43), Sources/Logging/Strings/RemoteConfigStrings.swift (RemoteConfigStrings.description at 33), and 19 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 15 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with VariablesV2.process (cyclomatic 107), PurchaseStrings.description (cyclomatic 78), OfferingStrings.description (cyclomatic 48). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 6.3 to about 7.7/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 36 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cognitive Complexity — start with VariablesV2.process (cognitive 108). — Refactoring it lifts Cognitive Complexity from 5.9 to about 6.5/10.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.8 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 23 MethodTooLong finding(s) in God Classes — start with Purchases.swift (2), ConditionalConfigurabilityPreview.swift (2), TextComponentView.swift. — One of this dimension's main actionable groups (23 warning-level).
Resolve the 21 FileTooLong finding(s) in God Classes — start with Purchases.swift, PurchasesOrchestrator.swift, VariableHandlerV2.swift. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 10 TooManyMethods finding(s) in God Classes — start with Purchases.swift, View+ExitOfferPresentation.swift, PurchasesOrchestrator.swift. — One of this dimension's main actionable groups (10 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
273 duplicated block group(s) detected. A further 17 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 34 of the 290 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 110 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 18 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with PurchaseInformation.swift, PurchaseHistoryViewModel.swift, SubscriptionDetailView.swift. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 15 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with FlexHStack.swift (3), View+PresentCustomerCenter.swift, RelevantPurchasesListView.swift. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 14 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with StackComponentView.swift (2), ProductsManager.swift (2), CustomerCenterViewController.swift. — One of this dimension's main actionable groups (14 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.4 / 10Stronggated by 1 serious finding✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
13 production modules (SwiftPM+Tuist), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 7 of the 13 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: RevenueCat (SwiftPM)
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 17 Low cohesion finding(s) in Cohesion (LCOM4) — start with View+ExitOfferPresentation.swift, Purchases.swift, CustomerCenterPurchases.swift. — One of this dimension's main actionable groups (17 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
222 test methods: 216 unit, 6 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality7.7 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
Test project verifies nothing: APITestersTests/APITesters/AllAPITests/AllAPITestsTests/AllAPITestsTests.swift:13
What to do
Resolve the 30 No assertions finding(s) in Test Quality — start with NativeNavigationUITests.swift (10), CustomerCenterPreviewUITests.swift (3), NativeAnalyticsUITests.swift (3). — One of this dimension's main actionable groups (30 warning-level).
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with AllAPITestsTests.swift. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Skipped test finding(s) in Test Quality — start with NativeNavigationUITests.swift. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
8 outdated direct SwiftPM dependencies, 3 pinning defect(s). 13 of 22 direct dependencies had their releases listed (0 naming no readable repository, 9 pinned to a branch or a revision rather than a version). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.
Dependency not covered by the committed resolution: swift-docc-plugin
No Package.resolved committed (Tuist/Package.swift)
Floating branch dependency: purchases-ios
Outdated: flyingfox · ×6
What to do
Resolve the 1 Dependency not covered by the committed resolution finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No Package.resolved committed (Tuist/Package.swift) finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Floating branch dependency finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
1 of 181 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 181 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. 3 of them publish no licence on rubygems.org; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a Swift Package.swift/Package.resolved, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
Banned license: colorize
What to do
Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).
Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: RevenueCatUI/Data/Strings.swift (16×111=1776); Sources/Purchasing/Purchases/Purchases.swift (58×27=1566); RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift (7×107=749) Repeated repair below the complexity floor: RevenueCatUI/Templates/V2/PaywallsV2View.swift (10 of 19 changes were fixes); RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift (5 of 7 changes were fixes); RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift (5 of 6 changes were fixes)
Resolve the 21 Hotspot finding(s) in Churn × Complexity Hotspots — start with Strings.swift, Purchases.swift, VariableHandlerV2.swift. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with PaywallsV2View.swift, VideoComponentView.swift, TabsComponentViewModel.swift. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.5 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
102 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/Purchasing/Purchases/TransactionPoster.swift. Counted over 674 of the 1033 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×7
Further sole-owners (lower concentration)
What to do
Resolve the 7 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (7 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
6 deducted task-comment markers across 158820 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 4 TodoComment finding(s) in Explicit Debt — start with BackendGetRemoteConfigTests.swift, RemoteConfigManager.swift, CustomerCenterConfigData.swift. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with ViewModelFactory.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with Project.swift. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
2 of 5 build units (Bundler, SwiftPM) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
17 finding(s): 0 critical, 15 high, 2 medium, 0 low. semgrep hit a parse error in 4 file(s) — `Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h`, `Tests/RevenueCatUITests/Data/__Snapshots__/PaywallDataValidationTests/iOS18-testUnrecognizedIconsGeneratesDefaultPaywall-watchOS.1.json`, `ci_scripts/deploy-admob-spm.sh` (line 11), `scripts/install-ios-runtime.sh` (line 17) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED. — One of this dimension's main actionable groups (11 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
91 of 674 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/Misc/Obsoletions.swift. Counted over 674 of the 1033 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 2 Orphaned knowledge finding(s) in Knowledge Freshness — start with Obsoletions.swift, DebugContentViews.swift. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 89 Orphaned file finding(s) in Knowledge Freshness — start with StoreKit2TransactionFetcher.swift, PurchasesDiagnostics.swift, ProductsFetcherSK1.swift. — One of this dimension's main actionable groups (89 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with MockPurchases.swift, TextComponentView.swift, PaywallComponentTypeTransformers.swift. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 26 Change coupling finding(s) in Change Coupling — start with RelevantPurchasesListViewModel.swift (2), ButtonComponentView.swift (2), ExternalPurchaseStrings.swift. — One of this dimension's main actionable groups (26 warning-level).
Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with SK2StoreTransaction.swift, MockCustomerCenterPurchases.swift, ImageComponentViewModel.swift. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 11 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model7.6 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`Headers` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Sources/Networking/HTTPClient/HTTPRequest.swift:85
`EntitlementInfo` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Sources/Purchasing/EntitlementInfo.swift:101
`KeptCheckout` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — RevenueCatUI/Purchasing/HostedCheckout.swift:170
`Color` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — RevenueCatUI/CustomerCenter/ColorFromAppearance.swift:18
What to do
Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Event-Driven — Whether persisted/published domain events are named in the past tense (facts that happened) rather than imperatively.
Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.
`close` is an imperative name inside a domain-event set whose siblings are past-tense facts — it reads as an intent, not something that happened. Name it for the event that occurred (e.g. `itemAdded`) so the event log records facts. — Sources/Paywalls/Events/WorkflowEvent.swift:17
What to do
Name domain-event cases in the past tense — they record facts that already happened.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (a `struct` with `let` fields) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
662 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 3 of 4 project(s) that lack one — worth up to 1.5 pts.
Review the README against recent changes; refresh the parts that drifted.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability7.2 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 125760 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/actionlint.yml:6
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 13 use(s) across 175,570 production line(s) (~0.1/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Swift: on hot paths, reserveCapacity before appending, use ContiguousArray for class-element arrays, work in place with withUnsafeBufferPointer/withUnsafeTemporaryAllocation, and make large values ~Copyable with borrowing/consuming parameters.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. (×2) — Sources/Misc/Concurrency/AsyncSleeper.swift:27, RevenueCatUI/Purchasing/PurchaseHandler+TestData.swift:135
What to do
Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — fastlane/storekit_config_file_watcher.rb:40
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — Sources/Diagnostics/DiagnosticsFileHandler.swift:229, Sources/Caching/LargeItemCacheType.swift:145, Sources/Ads/RewardVerification/ConfiguredAdRewardsProvider.swift:47, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 4 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
What to do
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 17 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 56 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — no class or module declares an abstract method
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — D19 withholds "Documentation: empty section": 6 candidate(s) were measured and not published.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Ruby, Swift not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .rb, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D27 Navigability — symbol resolution incomplete — navigability not assessed
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 23 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — Swift suite
DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
DM6 Domain ↔ infrastructure boundary — this Swift package maps no type to a persistence framework and declares no domain-model type carrying a method of its own, so DM6's domain↔infrastructure boundary read has no population to be taken over
DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Ruby, Swift source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
DM4 · Rich vs anemic domain model· Anemic domain model · ×4
Anemic domain model: Headers Sources/Networking/HTTPClient/HTTPRequest.swift:85— `Headers` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Anemic domain model: EntitlementInfo Sources/Purchasing/EntitlementInfo.swift:101— `EntitlementInfo` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Anemic domain model: KeptCheckout RevenueCatUI/Purchasing/HostedCheckout.swift:170— `KeptCheckout` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Anemic domain model: Color RevenueCatUI/CustomerCenter/ColorFromAppearance.swift:18— `Color` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Boundary-crossing change coupling: MockPurchases.swift ↔ Purchases.swift RevenueCatUI/Purchasing/MockPurchases.swift:1— `RevenueCatUI/Purchasing/MockPurchases.swift` (context RevenueCatUI) and `Sources/Purchasing/Purchases/Purchases.swift` (context Sources) sit in DIFFERENT parts of the tree yet change together 83% of the time (15 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `29937373` Let the backend decide which hosted checkout session the customer con…; `73fdc97d` Resume a customer's previous hosted checkout session (#7889); `a06f8d82` Feat(Paywalls): Web Views can observe paywall data (#7542) — run `git show` on any of them.
Boundary-crossing change coupling: TextComponentView.swift ↔ PaywallTextComponent.swift RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:1— `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift` (context RevenueCatUI) and `Sources/Paywalls/Components/PaywallTextComponent.swift` (context Sources) sit in DIFFERENT parts of the tree yet change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `b8286930` Introduce PaywallFontManagerType to handle custom fonts in the paywal…; `41147c0d` [Paywalls V2] Accept number as font size for text (#4654); `cff5ff6f` [Paywalls V2] Update text spec (#4469) (at that commit the file was still `RevenueCatUI/Templates/Components/Text/TextComponentView.swift`) — run `git show` on any of them.
Boundary-crossing change coupling: PaywallComponentTypeTransformers.swift ↔ PaywallTextComponent.swift RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift:1— `RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift` (context RevenueCatUI) and `Sources/Paywalls/Components/PaywallTextComponent.swift` (context Sources) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `cff5ff6f` [Paywalls V2] Update text spec (#4469) (at that commit the file was still `RevenueCatUI/Templates/Components/PaywallComponentTypeTransformers.swift`); `44dde1ee` Part 1: Respec color (#4468) (at that commit the file was still `RevenueCatUI/Templates/Components/PaywallComponentTypeTransformers.swift`); `319fde3a` Fixes for paywalls v2 renderer after testing some real life paywalls … (at that commit the file was still `RevenueCatUI/Templates/Components/PaywallComponentTypeTransformers.swift`) — run `git show` on any of them.
Orphaned knowledge Sources/Misc/Obsoletions.swift:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge Sources/Support/DebugUI/DebugContentViews.swift:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D10 · Test Quality· No assertions (empty test) · ×1
No assertions (empty test): testExample Tests/APITesters/AllAPITests/AllAPITestsTests/AllAPITestsTests.swift:13— Test method has an empty body — it asserts nothing and exercises no code.
Banned license: colorize — `colorize` 1.1.0 is published on rubygems.org under GPL-2.0, which this policy bans, and it is in the RUNTIME closure of this repository's Bundler manifests — so it is installed by everything that installs this repository, not just by its test harness. Replace it, or record an accepted exception.
No assertions: testParseWithNoReceiptThrowsError Tests/ReceiptParserTests/ReceiptParserFetchingTests.swift:31— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testParseWithNilURLThrowsError Tests/ReceiptParserTests/ReceiptParserFetchingTests.swift:47— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCanConfigureTheSDK Tests/InstallationTests/CommonFiles/InstallationTests.swift:24— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEachCarouselRestoresItsPageAfterTabChanges Tests/TestingApps/PaywallFixturesUITests/CarouselTabsUITests.swift:20— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testWebCheckoutDismissesWhenConfigured Tests/TestingApps/PaywallFixturesUITests/CustomerCenterPreviewUITests.swift:26— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testWebCheckoutRemainsOpenWhenConfigured Tests/TestingApps/PaywallFixturesUITests/CustomerCenterPreviewUITests.swift:30— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testWebLinkDismissesAndIsIntercepted Tests/TestingApps/PaywallFixturesUITests/CustomerCenterPreviewUITests.swift:34— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeAndEmbeddedCloseHaveMatchingAnalytics Tests/TestingApps/PaywallFixturesUITests/NativeAnalyticsUITests.swift:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRootBackDisplayedAsNativeCloseMatchesEmbeddedBackAnalytics Tests/TestingApps/PaywallFixturesUITests/NativeAnalyticsUITests.swift:17— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeAndEmbeddedBackHaveMatchingAnalyticsAfterNavigation Tests/TestingApps/PaywallFixturesUITests/NativeAnalyticsUITests.swift:21— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeWorkflowControlsPreventCallerPopAtRootAndLaterPages Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:23— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeBackNavigatesWithinWorkflowWithoutPoppingCallerNavigation Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:79— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testSinglePageNativeBackDismissesWithoutCallerBack Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:84— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeBackAndCloseInSheetPresentation Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:92— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeBackAndCloseInFullScreenPresentation Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:98— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEmbeddedCarouselCloseDismissesFromEachPage Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:121— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNativeCarouselCloseDismissesFromEachPage Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:125— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testInlineSheetKeepsItsDesignedCloseAndRestoresOuterNativeClose Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:223— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testBadgeBackInInlineSheetDismissesOnlyTheSheet Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:227— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEmbeddedBadgeBackDismissesPaywall Tests/TestingApps/PaywallFixturesUITests/NativeNavigationUITests.swift:231— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testBillingContentAndPurchaseSelectionFollowTheTierAcrossRepeatedSwitches Tests/TestingApps/PaywallFixturesUITests/NestedBillingTabsUITests.swift:20— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFreeTrialRendersTheWordAndTheAmountSideBySide Tests/TestingApps/PaywallFixturesUITests/OfferPriceWithZeroUITests.swift:27— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testIconOnlyButtonPaywallDescribesEveryElement Tests/TestingApps/PaywallFixturesUITests/PaywallAccessibilityUITests.swift:40— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDecorativeMediaIsNotAnnounced Tests/TestingApps/PaywallFixturesUITests/PaywallAccessibilityUITests.swift:70— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: invalidKeysAreLoggedWhenFiltered Tests/UnitTests/LocalRules/CustomVariableKeyValidatorTests.swift:112— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Change coupling: ExternalPurchaseStrings.swift ↔ ExternalPurchaseManager.swift Sources/Logging/Strings/ExternalPurchaseStrings.swift:1— `Sources/Logging/Strings/ExternalPurchaseStrings.swift` and `Sources/Purchasing/ExternalPurchase/ExternalPurchaseManager.swift` change together 100% of the time (10 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `5a43ac52` Allow opting in to external purchase custom links (experimental) (#7809); `82bcc88f` Use a positive simulator external purchase setting (#7856); `389762ad` Allow web purchases in the simulator regardless of storefront (experi… — run `git show` on any of them.
Change coupling: MockPurchases.swift ↔ LoadingPaywallView.swift RevenueCatUI/Purchasing/MockPurchases.swift:1— `RevenueCatUI/Purchasing/MockPurchases.swift` and `RevenueCatUI/Views/LoadingPaywallView.swift` change together 94% of the time (17 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `29937373` Let the backend decide which hosted checkout session the customer con…; `73fdc97d` Resume a customer's previous hosted checkout session (#7889); `17c82388` Open the in-app web checkout from the purchase button (#7691) — run `git show` on any of them.
Change coupling: DiagnosticsTracker.swift ↔ DiagnosticsEventsRequest.swift Sources/Diagnostics/DiagnosticsTracker.swift:1— `Sources/Diagnostics/DiagnosticsTracker.swift` and `Sources/Diagnostics/Networking/DiagnosticsEventsRequest.swift` change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `9533c597` Create `DiagnosticsEvent.Properties` for type safe diagnostics (#4843); `f7fa5d2e` [Diagnostics] Add extra parameters to `applePurchaseAttempt` (#4835); `8f5a9488` [Diagnostics] Add requestedProductIds and notFoundProductIds to apple… — run `git show` on any of them.
Change coupling: WorkflowStepEventTracker.swift ↔ WorkflowPaywallView.swift RevenueCatUI/Templates/V2/ViewModelHelpers/WorkflowStepEventTracker.swift:1— `RevenueCatUI/Templates/V2/ViewModelHelpers/WorkflowStepEventTracker.swift` and `RevenueCatUI/Templates/V2/WorkflowPaywallView.swift` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `32c166e7` other(workflows): route the first step with the workflow's initial tr…; `af9cc0f8` other(workflows): route a branch trigger action to the step its audie…; `02b4a0a8` other: echo step experiment params on workflow events (#7659) — run `git show` on any of them.
Change coupling: Template2View.swift ↔ Template3View.swift RevenueCatUI/Templates/Template2View.swift:1— `RevenueCatUI/Templates/Template2View.swift` and `RevenueCatUI/Templates/Template3View.swift` change together 73% of the time (11 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `0a627d7d` RemoteImage Low Res Image support (#3906); `023b59b7` `Paywalls`: improved `FooterView` (#3171); `515933c5` `Paywalls`: enabled `Catalyst` support (#3087) — run `git show` on any of them.
Change coupling: View+PresentPaywall.swift ↔ View+PurchaseRestoreCompleted.swift RevenueCatUI/View+PresentPaywall.swift:1— `RevenueCatUI/View+PresentPaywall.swift` and `RevenueCatUI/View+PurchaseRestoreCompleted.swift` change together 69% of the time (11 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `7b8b2b75` fix(paywalls): report purchase cancellations without fetching Custome…; `dc435298` feat(paywalls): Add onPaywallInteraction callback (#7583); `8720c34c` feat: add onURLOpened to paywall listener surfaces (#7320) — run `git show` on any of them.
Change coupling: Template1View.swift ↔ Template3View.swift RevenueCatUI/Templates/Template1View.swift:1— `RevenueCatUI/Templates/Template1View.swift` and `RevenueCatUI/Templates/Template3View.swift` change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0a627d7d` RemoteImage Low Res Image support (#3906); `023b59b7` `Paywalls`: improved `FooterView` (#3171); `515933c5` `Paywalls`: enabled `Catalyst` support (#3087) — run `git show` on any of them.
Change coupling: PaywallView.swift ↔ TemplateViewType.swift RevenueCatUI/PaywallView.swift:1— `RevenueCatUI/PaywallView.swift` and `RevenueCatUI/Templates/TemplateViewType.swift` change together 66% of the time (19 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `8611ca2c` Remove already-subscribed logic from paywalls (#7487); `9513dab4` Paywalls: Allow closed button color to be configured (#3805); `0fc9f30a` `Paywalls`: move size configuration to `TemplateViewType` (#3352) — run `git show` on any of them.
Change coupling: Attribution.swift ↔ ReservedSubscriberAttributes.swift Sources/Purchasing/Purchases/Attribution.swift:1— `Sources/Purchasing/Purchases/Attribution.swift` and `Sources/SubscriberAttributes/ReservedSubscriberAttributes.swift` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `caa1fc51` feat(singular) add $singularDeviceId subscriber attribute for Singula…; `496b560a` [CIA-5346] Appstack integration to ios sdk (#6366); `feeb3edd` Add Solar Engine integration support (#5992) — run `git show` on any of them.
Change coupling: CustomerCenterConfigData+Mock.swift ↔ PurchaseInformation.swift RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigData+Mock.swift:1— `RevenueCatUI/CustomerCenter/Data/CustomerCenterConfigData+Mock.swift` and `RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift` change together 62% of the time (16 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `b5995ac1` Add custom change plans support for customer center (#5379); `2398f48f` Make latestPurchaseDate non-optional in PurchaseInformation (#5144); `b959bb56` Add isActive to PurchaseInformation for CustomerCenter (#5152) — run `git show` on any of them.
Change coupling: PurchaseInformation+Mock.swift ↔ Transaction.swift RevenueCatUI/CustomerCenter/Data/PurchaseInformation+Mock.swift:1— `RevenueCatUI/CustomerCenter/Data/PurchaseInformation+Mock.swift` and `RevenueCatUI/CustomerCenter/Data/Transaction.swift` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `31abd270` fix non-renewable appstore PATHs for customer center (#5468); `6733f53a` Remove trailing text for PurchaseCardView, and simplify billing infor…; `8ad57696` Add originalPurchaseDate & isSandbox to PurchaseInformation (#5259) — run `git show` on any of them.
Change coupling: RelevantPurchasesListViewModel.swift ↔ CustomerCenterView.swift RevenueCatUI/CustomerCenter/ViewModels/RelevantPurchasesListViewModel.swift:1— `RevenueCatUI/CustomerCenter/ViewModels/RelevantPurchasesListViewModel.swift` and `RevenueCatUI/CustomerCenter/Views/CustomerCenterView.swift` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3c2bf263` Add account details to single purchase view (#5327); `b4631ac6` Pass CustomerCenterViewModel as a ObservedObject to the detail screen…; `0be0ab56` Dont show `see all purchases` button if there's nothing else to show … — run `git show` on any of them.
Change coupling: PurchaseHandler.swift ↔ WorkflowStepEventTracker.swift RevenueCatUI/Purchasing/PurchaseHandler.swift:1— `RevenueCatUI/Purchasing/PurchaseHandler.swift` and `RevenueCatUI/Templates/V2/ViewModelHelpers/WorkflowStepEventTracker.swift` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `32c166e7` other(workflows): route the first step with the workflow's initial tr…; `af9cc0f8` other(workflows): route a branch trigger action to the step its audie…; `02b4a0a8` other: echo step experiment params on workflow events (#7659) — run `git show` on any of them.
Change coupling: TextComponentViewModel.swift ↔ PaywallComponentTypeTransformers.swift RevenueCatUI/Templates/V2/Components/Text/TextComponentViewModel.swift:1— `RevenueCatUI/Templates/V2/Components/Text/TextComponentViewModel.swift` and `RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `75f23187` feat: Allow disabling of automatic font scaling (#6727); `4672cbb1` [Paywalls V2] Add support for alias solid hex colors (not gradients) …; `68bf2477` [Paywalls V2] Support custom fonts with UIConfig (#4631) — run `git show` on any of them.
Change coupling: ComponentsView.swift ↔ ViewModelFactory.swift RevenueCatUI/Templates/V2/Components/ComponentsView.swift:1— `RevenueCatUI/Templates/V2/Components/ComponentsView.swift` and `RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `9da34c0f` feat(paywalls): enable web_view component (7/7) (#7233); `8d97a2bd` Paywalls countdown component (#5790); `6728494f` Paywall video component model creation -- Not views, just models (#5481) — run `git show` on any of them.
Change coupling: PackageComponentView.swift ↔ PurchaseButtonComponentView.swift RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:1— `RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift` and `RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0c812de0` Support Video as the hero component (#5684); `b1bb834b` Package component doesn't wrap content in button if there is a purcha…; `ca12ad7c` [Paywalls V2] Ignore top safe area edges for image (#4744) — run `git show` on any of them.
Change coupling: StackComponentView.swift ↔ PaywallComponentTypeTransformers.swift RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:1— `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift` and `RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `b5fa3031` Extend the padding by border.width amount in components that support …; `4672cbb1` [Paywalls V2] Add support for alias solid hex colors (not gradients) …; `68bf2477` [Paywalls V2] Support custom fonts with UIConfig (#4631) — run `git show` on any of them.
Change coupling: IdentityManager.swift ↔ IdentityStrings.swift Sources/Identity/IdentityManager.swift:1— `Sources/Identity/IdentityManager.swift` and `Sources/Logging/Strings/IdentityStrings.swift` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `5c06ddd0` fix: warn when configure app user ID differs from cached ID (#7694); `3dfd2445` Guard switchUser against preview mode (PW-963) (#6371); `788b6276` UI Preview Mode: app user ID (#4725) — run `git show` on any of them.
Change coupling: ButtonComponentView.swift ↔ PackageComponentView.swift RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:1— `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift` and `RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `0c812de0` Support Video as the hero component (#5684); `b1bb834b` Package component doesn't wrap content in button if there is a purcha…; `ca12ad7c` [Paywalls V2] Ignore top safe area edges for image (#4744) — run `git show` on any of them.
Change coupling: CheckpointWorkflowResolver.swift ↔ WorkflowsConfigProvider.swift Sources/Checkpoints/CheckpointWorkflowResolver.swift:1— `Sources/Checkpoints/CheckpointWorkflowResolver.swift` and `Sources/Networking/WorkflowsConfigProvider.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `4cb71a6a` feat(checkpoints): Resolve the offering per workflow step (#7658); `02b4a0a8` other: echo step experiment params on workflow events (#7659); `4939ef18` fix(checkpoints): ensure remote config reads are generation consisten… — run `git show` on any of them.
Change coupling: PaywallStackComponent.swift ↔ PaywallTextComponent.swift Sources/Paywalls/Components/PaywallStackComponent.swift:1— `Sources/Paywalls/Components/PaywallStackComponent.swift` and `Sources/Paywalls/Components/PaywallTextComponent.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `44dde1ee` Part 1: Respec color (#4468); `54f45839` Apply state and conditions ONLY for text component (#4417); `bcef02ad` Text, Image, and Stack properties can be overridden on different stat… — run `git show` on any of them.
Change coupling: SigningStrings.swift ↔ Signing+ResponseVerification.swift Sources/Logging/Strings/SigningStrings.swift:1— `Sources/Logging/Strings/SigningStrings.swift` and `Sources/Security/Signing+ResponseVerification.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `db27086e` Extract signature verification failure reasons (#7777); `cf77437c` feat(remote-config): verify RC container signatures (#7046); `bd3ac5fa` `Trusted Entitlements`: produce verification failures for static endp… — run `git show` on any of them.
Change coupling: RelevantPurchasesListViewModel.swift ↔ SubscriptionDetailView.swift RevenueCatUI/CustomerCenter/ViewModels/RelevantPurchasesListViewModel.swift:1— `RevenueCatUI/CustomerCenter/ViewModels/RelevantPurchasesListViewModel.swift` and `RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `3907fe4f` feat(customer-center): Add stateful Customer Center preview actions a…; `f8d78808` feat(customer center): show Resubscribe for cancelled subscriptions (…; `3c2bf263` Add account details to single purchase view (#5327) — run `git show` on any of them.
Change coupling: DiagnosticsStrings.swift ↔ Purchases.swift Sources/Logging/Strings/DiagnosticsStrings.swift:1— `Sources/Logging/Strings/DiagnosticsStrings.swift` and `Sources/Purchasing/Purchases/Purchases.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `8e6b8aa3` feat(diagnostics): configure collection from SDK settings (#7815); `a2976290` [Diagnostics] Sync diagnostics if file reaches lower size limit (#4929); `ffe5b8b3` Diagnostics: Add logic to retry on server errors (#3930) — run `git show` on any of them.
Change coupling: ButtonComponentView.swift ↔ PackageComponentViewModel.swift RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:1— `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift` and `RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentViewModel.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `b1bb834b` Package component doesn't wrap content in button if there is a purcha…; `19ac0b67` [Paywalls V2] Introduce new `LocalizationProvider` for localized stri… (at that commit the files were still `RevenueCatUI/Templates/Components/Button/ButtonComponentView.swift` and `RevenueCatUI/Templates/Components/Packages/Package/PackageComponentViewModel.swift`); `7f513b92` Create paywall component view models in a factory (#4455) (at that commit the files were still `RevenueCatUI/Templates/Components/Button/ButtonComponentView.swift` and `RevenueCatUI/Templates/Components/Packages/Package/PackageComponentViewModel.swift`) — run `git show` on any of them.
MethodTooLong: Purchases.init Sources/Purchasing/Purchases/Purchases.swift:354— MethodTooLong — init runs 454 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 354 over it, 4.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextComponentView_Previews.previews RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:424— MethodTooLong — previews runs 367 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ViewModelFactory.toViewModel RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift:113— MethodTooLong — toViewModel runs 334 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 234 over it, 3.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: VariablesV2.process RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:405— MethodTooLong — process runs 311 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 211 over it, 3.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CommonLocalizedString.defaultValue Sources/CustomerCenter/CustomerCenterConfigData.swift:194— MethodTooLong — defaultValue runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Strings.description RevenueCatUI/Data/Strings.swift:157— MethodTooLong — description runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StackComponentView_Previews.previews RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:523— MethodTooLong — previews runs 242 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PurchaseStrings.description Sources/Logging/Strings/PurchaseStrings.swift:112— MethodTooLong — description runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ImageComponentView_Previews.previews RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:441— MethodTooLong — previews runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CarouselComponentView_Previews.previews RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:751— MethodTooLong — previews runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConditionalVisibility_Previews.previews RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:30— MethodTooLong — previews runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LoadedTabsComponentView.body RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:328— MethodTooLong — body runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: OfferingStrings.description Sources/Logging/Strings/OfferingStrings.swift:63— MethodTooLong — description runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Purchases.init Sources/Purchasing/Purchases/Purchases.swift:916— MethodTooLong — init runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BackgrounDStyle_Previews.previews RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:193— MethodTooLong — previews runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StoreKitStrings.description Sources/Logging/Strings/StoreKitStrings.swift:135— MethodTooLong — description runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CornerBorder_Previews.previews RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:554— MethodTooLong — previews runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SubscriptionDetailView_Previews.previews RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:384— MethodTooLong — previews runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConfigureStrings.description Sources/Logging/Strings/ConfigureStrings.swift:89— MethodTooLong — description runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PurchasesOrchestrator.performSK2Purchase Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:834— MethodTooLong — performSK2Purchase runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ButtonComponentView_Previews.previews RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:472— MethodTooLong — previews runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConditionalStackVisibility_Previews.previews RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:311— MethodTooLong — previews runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultPaywallView.body RevenueCatUI/Views/DefaultPaywall/DefaultPaywallView.swift:115— MethodTooLong — body runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: RevenueCatUI/Data/Strings.swift RevenueCatUI/Data/Strings.swift:157— RevenueCatUI/Data/Strings.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in Strings.description at line 157. 1 of those changes was a fix/bug commit, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Data/Strings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Purchasing/Purchases/Purchases.swift Sources/Purchasing/Purchases/Purchases.swift:354— Sources/Purchasing/Purchases/Purchases.swift changed 58 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Purchases.init at line 354. 4 of those changes were fix/bug commits, and the other 54 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Purchasing/Purchases/Purchases.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:405— RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in VariablesV2.process at line 405. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/CustomerCenter/CustomerCenterConfigData.swift Sources/CustomerCenter/CustomerCenterConfigData.swift:194— Sources/CustomerCenter/CustomerCenterConfigData.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 133 in CommonLocalizedString.defaultValue at line 194. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/CustomerCenter/CustomerCenterConfigData.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Checkpoints/CheckpointWorkflowResolver.swift Sources/Checkpoints/CheckpointWorkflowResolver.swift:178— Sources/Checkpoints/CheckpointWorkflowResolver.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in DefaultCheckpointWorkflowResolver.attemptResolveConfiguredWorkflow at line 178. 4 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Checkpoints/CheckpointWorkflowResolver.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/RemoteConfigStrings.swift Sources/Logging/Strings/RemoteConfigStrings.swift:49— Sources/Logging/Strings/RemoteConfigStrings.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in RemoteConfigStrings.description at line 49. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/RemoteConfigStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:328— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in LoadedTabsComponentView.body at line 328. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/PurchaseStrings.swift Sources/Logging/Strings/PurchaseStrings.swift:112— Sources/Logging/Strings/PurchaseStrings.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in PurchaseStrings.description at line 112. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/PurchaseStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Purchasing/Purchases/PurchasesOrchestrator.swift Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:834— Sources/Purchasing/Purchases/PurchasesOrchestrator.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PurchasesOrchestrator.performSK2Purchase at line 834. 4 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Purchasing/Purchases/PurchasesOrchestrator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:193— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in StackComponentView.make at line 193. 5 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift:113— RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ViewModelFactory.toViewModel at line 113. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Networking/HTTPClient/HTTPClient.swift Sources/Networking/HTTPClient/HTTPClient.swift:606— Sources/Networking/HTTPClient/HTTPClient.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in HTTPClient.handle at line 606. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Networking/HTTPClient/HTTPClient.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/HostedCheckoutStrings.swift Sources/Logging/Strings/HostedCheckoutStrings.swift:44— Sources/Logging/Strings/HostedCheckoutStrings.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in HostedCheckoutStrings.description at line 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/HostedCheckoutStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/NetworkStrings.swift Sources/Logging/Strings/NetworkStrings.swift:72— Sources/Logging/Strings/NetworkStrings.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in NetworkStrings.description at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/NetworkStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift:65— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ButtonComponentViewModel.init at line 65. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/PaywallsStrings.swift Sources/Logging/Strings/PaywallsStrings.swift:79— Sources/Logging/Strings/PaywallsStrings.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in PaywallsStrings.description at line 79. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/PaywallsStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Error Handling/BackendErrorCode.swift Sources/Error Handling/BackendErrorCode.swift:101— Sources/Error Handling/BackendErrorCode.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in BackendErrorCode.toPurchasesErrorCode at line 101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Error Handling/BackendErrorCode.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/Templates/V2/Components/ComponentsView.swift RevenueCatUI/Templates/V2/Components/ComponentsView.swift:102— RevenueCatUI/Templates/V2/Components/ComponentsView.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ComponentsView.view at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/ComponentsView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: RevenueCatUI/CustomerCenter/Actions/CustomerCenterConfigData.HelpPath+PurchaseInformation.swift RevenueCatUI/CustomerCenter/Actions/CustomerCenterConfigData.HelpPath+PurchaseInformation.swift:34— RevenueCatUI/CustomerCenter/Actions/CustomerCenterConfigData.HelpPath+PurchaseInformation.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in HelpPath.hiddenReason at line 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/CustomerCenter/Actions/CustomerCenterConfigData.HelpPath+PurchaseInformation.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/AdsStrings.swift Sources/Logging/Strings/AdsStrings.swift:50— Sources/Logging/Strings/AdsStrings.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in AdsStrings.description at line 50. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/AdsStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/Logging/Strings/CustomerInfoStrings.swift Sources/Logging/Strings/CustomerInfoStrings.swift:47— Sources/Logging/Strings/CustomerInfoStrings.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in CustomerInfoStrings.description at line 47. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- Sources/Logging/Strings/CustomerInfoStrings.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: Purchases/Purchases.swift Sources/Purchasing/Purchases/Purchases.swift— FileTooLong — 2037 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1537 over it, 4.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Purchases/PurchasesOrchestrator.swift Sources/Purchasing/Purchases/PurchasesOrchestrator.swift— FileTooLong — 1704 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1204 over it, 3.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Variables/VariableHandlerV2.swift RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift— FileTooLong — 1130 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 630 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Purchasing/PurchaseHandler.swift RevenueCatUI/Purchasing/PurchaseHandler.swift— FileTooLong — 965 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 465 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: V2/WorkflowPaywallView.swift RevenueCatUI/Templates/V2/WorkflowPaywallView.swift— FileTooLong — 952 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: WorkflowPaywallView (267-1192). The bar is 500 significant lines; this is 452 over it, 1.90× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: HTTPClient/HTTPClient.swift Sources/Networking/HTTPClient/HTTPClient.swift— FileTooLong — 877 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 377 over it, 1.75× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: CustomerCenter/CustomerCenterConfigData.swift Sources/CustomerCenter/CustomerCenterConfigData.swift— FileTooLong — 859 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 359 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Tabs/TabsComponentView.swift RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift— FileTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 261 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Stack/StackComponentView.swift RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift— FileTooLong — 748 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 248 over it, 1.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: V2/PaywallsV2View.swift RevenueCatUI/Templates/V2/PaywallsV2View.swift— FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 205 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: RevenueCatUI/View+PresentPaywall.swift RevenueCatUI/View+PresentPaywall.swift— FileTooLong — 676 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 176 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Networking/RemoteConfigManager.swift Sources/Networking/RemoteConfigManager.swift— FileTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 173 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Carousel/CarouselComponentView.swift RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift— FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 165 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Text/TextComponentView.swift RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift— FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: TextComponentView_Previews (378-997). The bar is 500 significant lines; this is 124 over it, 1.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: fastlane/api_diff_helper.rb fastlane/api_diff_helper.rb— FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 110 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: RevenueCatUI/PaywallView.swift RevenueCatUI/PaywallView.swift— FileTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 103 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: UIKit/PaywallViewController.swift RevenueCatUI/UIKit/PaywallViewController.swift— FileTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 95 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Purchasing/OfferingsManager.swift Sources/Purchasing/OfferingsManager.swift— FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 37 over it, 1.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Events/AdEvent.swift Sources/Ads/Events/AdEvent.swift— FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Misc/Obsoletions.swift Sources/Misc/Obsoletions.swift— FileTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 22 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Image/ImageComponentView.swift RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift— FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: ImageComponentView_Previews (329-757). The bar is 500 significant lines; this is 21 over it, 1.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (13 lines × 2) RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:164— RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:164-176 | Sources/CustomerCenter/CustomerCenterConfigData.swift:806-818 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:164` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) RevenueCatUI/CustomerCenter/ViewModels/PurchaseHistory/PurchaseHistoryViewModel.swift:123— RevenueCatUI/CustomerCenter/ViewModels/PurchaseHistory/PurchaseHistoryViewModel.swift:123-135 | RevenueCatUI/CustomerCenter/ViewModels/PurchaseHistory/PurchaseHistoryViewModel.swift:138-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/ViewModels/PurchaseHistory/PurchaseHistoryViewModel.swift:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:511— RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:511-523 | RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:534-546 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:511` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Components/Root/RootView.swift:408— RevenueCatUI/Templates/V2/Components/Root/RootView.swift:408-420 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift:243-255 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Root/RootView.swift:408` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift:242` calls `footerCTAText` and `RevenueCatUI/Templates/V2/Components/Root/RootView.swift:407` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:233— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:233-245 | RevenueCatUI/Templates/V2/PaywallsV2View.swift:701-713 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:401— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:401-413 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:30-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:401` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:523— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:523-535 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:540-552 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:553` calls `environment` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:536` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:376— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:376-388 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:416-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:376` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:232— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:232-244 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:249-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:262` calls `environment` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:245` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) Sources/Purchasing/SimulatedStore/SimulatedStoreTransaction.swift:17— Sources/Purchasing/SimulatedStore/SimulatedStoreTransaction.swift:17-33 | Sources/Purchasing/StoreKitAbstractions/TestStoreTransaction.swift:20-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:30— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:30-42 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:29-41 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) Sources/Ads/Events/Networking/PostAdEventsOperation.swift:25— Sources/Ads/Events/Networking/PostAdEventsOperation.swift:25-37 | Sources/Events/FeatureEvents/Networking/PostFeatureEventsOperation.swift:24-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) Sources/Networking/Operations/GetCustomerCenterConfigOperation.swift:23— Sources/Networking/Operations/GetCustomerCenterConfigOperation.swift:23-35 | Sources/Networking/Operations/GetVirtualCurrenciesOperation.swift:21-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `callbackCache` to `CallbackCache<CustomerCenterConfigCallback>` in one and `CallbackCache<VirtualCurrenciesCallback>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) Sources/Networking/Operations/GetOfferingsOperation.swift:21— Sources/Networking/Operations/GetOfferingsOperation.swift:21-33 | Sources/Networking/Operations/GetWebOfferingProductsOperation.swift:21-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) Examples/SampleCat/SampleCat/Screens/Checkpoints/CheckpointsTabView.swift:69— Examples/SampleCat/SampleCat/Screens/Checkpoints/CheckpointsTabView.swift:69-81 | Examples/SampleCat/SampleCat/Screens/Paywalls/PaywallsTabView.swift:28-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/SampleCat/SampleCat/Screens/Checkpoints/CheckpointsTabView.swift:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Examples/SampleCat/SampleCat/UserViewModel.swift:38— Examples/SampleCat/SampleCat/UserViewModel.swift:38-50 | Examples/SampleCat/SampleCat/UserViewModel.swift:53-65 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/App.swift:8— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/App.swift:8-20 | Examples/VanillaAdTrackingSample/Sources/App.swift:8-20 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/App.swift` and `Examples/VanillaAdTrackingSample/Sources/App.swift` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:16— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:16-28 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:7-19 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift` and `Examples/VanillaAdTrackingSample/Sources/HomeView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:16` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Low cohesion: View (LCOM4 100) RevenueCatUI/View+ExitOfferPresentation.swift:97— View's methods fall into 100 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 100 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Purchases (LCOM4 35) Sources/Purchasing/Purchases/Purchases.swift:61— Purchases's methods fall into 35 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 35 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CustomerCenterPurchases (LCOM4 15) RevenueCatUI/CustomerCenter/Data/CustomerCenterPurchases.swift:17— CustomerCenterPurchases's methods fall into 15 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 15 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: LoadingPaywallPurchases (LCOM4 14) RevenueCatUI/Views/LoadingPaywallView.swift:140— LoadingPaywallPurchases's methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 14 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MockCustomerCenterPurchases (LCOM4 14) RevenueCatUI/CustomerCenter/Mocks/MockCustomerCenterPurchases.swift:17— MockCustomerCenterPurchases's methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 14 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MockPurchases (LCOM4 13) RevenueCatUI/Purchasing/MockPurchases.swift:20— MockPurchases's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: NotConfiguredPurchases (LCOM4 9) RevenueCatUI/Purchasing/PurchaseHandler.swift:1352— NotConfiguredPurchases's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 8) Sources/Purchasing/Purchases/PurchaseParams.swift:84— Builder's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Dictionary (LCOM4 8) RevenueCatUI/Data/CustomPaywallVariables.swift:289— Dictionary's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: NoOpRemoteConfigManager (LCOM4 6) Sources/Networking/RemoteConfigManager.swift:279— NoOpRemoteConfigManager's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PurchasesOrchestrator (LCOM4 6) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:31— PurchasesOrchestrator's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: String (LCOM4 6) Contributing/SwiftStyleGuide.swift:165— String's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CustomerInfo (LCOM4 5) Sources/Identity/CustomerInfo.swift:27— CustomerInfo's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: UserViewModel (LCOM4 5) Examples/SampleCat/SampleCat/UserViewModel.swift:7— UserViewModel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: OperationDispatcher (LCOM4 4) Sources/Misc/Concurrency/OperationDispatcher.swift:34— OperationDispatcher's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: StoreProduct (LCOM4 4) Sources/Purchasing/StoreKitAbstractions/StoreProduct.swift:74— StoreProduct's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Coordinator (LCOM4 4) RevenueCatUI/Templates/V2/Components/WebView/WebViewComponentView.swift:361— Coordinator's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (11 lines × 2) RevenueCatUI/CustomerCenter/View+PresentCustomerCenter.swift:146— RevenueCatUI/CustomerCenter/View+PresentCustomerCenter.swift:146-156 | RevenueCatUI/CustomerCenter/View+PresentCustomerCenter.swift:224-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:236— RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:236-246 | RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:257-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) RevenueCatUI/PaywallView.swift:84— RevenueCatUI/PaywallView.swift:84-94 | RevenueCatUI/PaywallView.swift:111-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/PaywallView.swift:84` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/Template5View.swift:191— RevenueCatUI/Templates/Template5View.swift:191-201 | RevenueCatUI/Templates/Template7View.swift:318-328 — before extracting anything, compare `RevenueCatUI/Templates/Template5View.swift` and `RevenueCatUI/Templates/Template7View.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/Template5View.swift:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/Template5View.swift:202` calls `matchedGeometryEffect` and `RevenueCatUI/Templates/Template7View.swift:329` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:599— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:599-609 | RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:612-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:599` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:754— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:754-764 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:903-913 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:754` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:514— RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:514-524 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:550-560 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:514` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:55— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:55-65 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:70-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:55` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:65— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:65-75 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:64-74 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:80— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:80-90 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:79-89 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:530— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:530-540 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:239-249 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:530` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Sources/Ads/Events/Networking/PostAdEventsOperation.swift:39— Sources/Ads/Events/Networking/PostAdEventsOperation.swift:39-49 | Sources/Events/FeatureEvents/Networking/PostFeatureEventsOperation.swift:38-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) Sources/Networking/Responses/CustomerInfoResponse.swift:328— Sources/Networking/Responses/CustomerInfoResponse.swift:328-339 | Sources/Purchasing/StoreKitAbstractions/Test Data/TestStoreProduct.swift:134-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Networking/Responses/CustomerInfoResponse.swift:328` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:76— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:76-86 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:86-96 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:76— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:76-86 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:86-96 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) RevenueCatUI/CustomerCenter/Views/UIKit Compatibility/CustomerCenterViewController.swift:268— RevenueCatUI/CustomerCenter/Views/UIKit Compatibility/CustomerCenterViewController.swift:268-272 | RevenueCatUI/UIKit/PaywallViewController.swift:719-723 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/UIKit Compatibility/CustomerCenterViewController.swift:268` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:109— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:109-113 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:107-111 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:834— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:834-838 | RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:385-389 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:834` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) Sources/Events/FeatureEvents/FeatureEvent.swift:214— Sources/Events/FeatureEvents/FeatureEvent.swift:214-226 | Sources/Events/FeatureEvents/FeatureEvent.swift:260-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Events/FeatureEvents/FeatureEvent.swift:214` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1128— Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1128-1132 | Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1142-1146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) RevenueCatUI/Templates/Other platforms/WatchTemplateView.swift:262— RevenueCatUI/Templates/Other platforms/WatchTemplateView.swift:262-266 | RevenueCatUI/Templates/Template2View.swift:280-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) RevenueCatUI/Templates/Template2View.swift:46— RevenueCatUI/Templates/Template2View.swift:46-50 | RevenueCatUI/Templates/Template5View.swift:51-55 — before extracting anything, compare `RevenueCatUI/Templates/Template2View.swift` and `RevenueCatUI/Templates/Template5View.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) Sources/Ads/RewardVerification/AdRewardConfiguration.swift:129— Sources/Ads/RewardVerification/AdRewardConfiguration.swift:129-133 | Sources/Ads/RewardVerification/VirtualCurrencyReward.swift:28-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) Sources/Purchasing/ProductsManager.swift:161— Sources/Purchasing/ProductsManager.swift:161-165 | Sources/Purchasing/StoreKit1/ProductsFetcherSK1.swift:73-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift:152— Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift:152-158 | Sources/Purchasing/StoreKit1/StoreKit1Wrapper.swift:223-227 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift:146` calls `paymentQueue` and `Sources/Purchasing/StoreKit1/StoreKit1Wrapper.swift:218` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:1024— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:1024-1028 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:1030-1034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Sources/Purchasing/ProductsManager.swift:135— Sources/Purchasing/ProductsManager.swift:135-139 | Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1474-1478 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Purchasing/ProductsManager.swift:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Examples/VanillaAdTrackingSample/Sources/AdMobManager.swift:569— Examples/VanillaAdTrackingSample/Sources/AdMobManager.swift:569-573 | Examples/VanillaAdTrackingSample/Sources/AdMobManager.swift:586-590 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:42— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:42-46 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeVideoAdManager.swift:42-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:147— RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:147-152 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:177-182 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:220— RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:220-225 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:278-283 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) Sources/Events/FeatureEvents/FeatureEvent.swift:188— Sources/Events/FeatureEvents/FeatureEvent.swift:188-193 | Sources/Events/FeatureEvents/FeatureEvent.swift:309-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Events/FeatureEvents/FeatureEvent.swift:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Sources/Misc/Obsoletions.swift:435— Sources/Misc/Obsoletions.swift:435-440 | Sources/Misc/Obsoletions.swift:458-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Sources/RulesEngine/Value.swift:161— Sources/RulesEngine/Value.swift:161-166 | Sources/RulesEngine/Value.swift:339-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RulesEngine/Value.swift:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/RulesEngine/Value.swift:159` calls `jsStringEquals` and `Sources/RulesEngine/Value.swift:338` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/InterstitialPresentation.swift:164— AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/InterstitialPresentation.swift:164-169 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/RewardedPresentation.swift:252-257 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) RevenueCatUI/Data/TemplateViewConfiguration.swift:317— RevenueCatUI/Data/TemplateViewConfiguration.swift:317-322 | RevenueCatUI/Templates/V2/EnvironmentObjects/PackageContext.swift:61-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) RevenueCatUI/Templates/Template2View.swift:294— RevenueCatUI/Templates/Template2View.swift:294-299 | RevenueCatUI/Templates/Template5View.swift:271-276 — before extracting anything, compare `RevenueCatUI/Templates/Template2View.swift` and `RevenueCatUI/Templates/Template5View.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) Sources/CustomerCenter/CustomerCenterPresentationMode.swift:70— Sources/CustomerCenter/CustomerCenterPresentationMode.swift:70-75 | Sources/Paywalls/PaywallViewMode.swift:94-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentViewModel.swift:89— RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentViewModel.swift:89-94 | RevenueCatUI/Templates/V2/Components/WebView/WebViewComponentViewModel.swift:143-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) Sources/Ads/Events/StoredAdEventSerializer.swift:22— Sources/Ads/Events/StoredAdEventSerializer.swift:22-27 | Sources/Events/FeatureEvents/StoredFeatureEventSerializer.swift:22-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) RevenueCatUI/Views/TierSelectorView.swift:255— RevenueCatUI/Views/TierSelectorView.swift:255-260 | RevenueCatUI/Views/TierSelectorView.swift:298-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Views/TierSelectorView.swift:255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:35— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:35-40 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeVideoAdManager.swift:35-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Swallowed exception (caught, then discarded) fastlane/storekit_config_file_watcher.rb:40— `rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/Diagnostics/DiagnosticsFileHandler.swift:229— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/Caching/LargeItemCacheType.swift:145— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/Ads/RewardVerification/ConfiguredAdRewardsProvider.swift:47— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/Templates/V2/WorkflowPaywallView.swift:942— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/Templates/V2/EnvironmentObjects/PaywallPromoOfferCache.swift:137— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/Templates/V2/Components/Button/NativePaywallCloseButton.swift:127— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/Helpers/ImageLoader.swift:93— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/CustomerCenter/ViewModels/CustomerCenterViewModel.swift:382— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/CustomerCenter/ViewModels/VirtualCurrencyBalancesScreenViewModel.swift:81— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) RevenueCatUI/CustomerCenter/Utilities/CustomerCenterStoreKitUtilities.swift:80— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
TooManyMethods: Purchases Sources/Purchasing/Purchases/Purchases.swift:61— TooManyMethods — 243 methods, declared across 7 files: Purchases/Purchases.swift (153), Misc/Obsoletions.swift (34), Misc/Deprecations.swift (27), Concurrency/Purchases+async.swift (15), +3 more file(s). The bar is 30 methods; this is 213 over it, 8.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: View RevenueCatUI/View+ExitOfferPresentation.swift:97— TooManyMethods — 141 methods, declared across 50 files: Modifiers/ViewExtensions.swift (18), RevenueCatUI/View+PurchaseRestoreCompleted.swift (17), Actions/CustomerCenterView+Actions.swift (13), RevenueCatUI/View+PresentPaywallFooter.swift (8), +46 more file(s). The bar is 30 methods; this is 111 over it, 4.70× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PurchasesOrchestrator Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:31— TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PurchaseHandler RevenueCatUI/Purchasing/PurchaseHandler.swift:24— TooManyMethods — 69 methods, declared across 2 files: Purchasing/PurchaseHandler.swift (64), Purchasing/PurchaseHandler+TestData.swift (5). The bar is 30 methods; this is 39 over it, 2.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SubscriberAttributesManager Sources/SubscriberAttributes/SubscriberAttributesManager.swift:18— TooManyMethods — 58 methods, declared across 2 files: SubscriberAttributes/SubscriberAttributesManager.swift (53), SubscriberAttributes/SubscriberAttributesManager+Appstack.swift (5). The bar is 30 methods; this is 28 over it, 1.93× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RemoteConfigManager Sources/Networking/RemoteConfigManager.swift:343— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ApiDiffHelper fastlane/api_diff_helper.rb:10— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Attribution Sources/Purchasing/Purchases/Attribution.swift:26— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PaywallViewController RevenueCatUI/UIKit/PaywallViewController.swift:42— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DiagnosticsTracker Sources/Diagnostics/DiagnosticsTracker.swift:185— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (15 lines × 2) AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/RewardVerification/RewardedAds+RewardVerification.swift:38— AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/RewardVerification/RewardedAds+RewardVerification.swift:38-52 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/RewardVerification/RewardedAds+RewardVerification.swift:111-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:106— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:106-120 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:105-119 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:106` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:123— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:123-137 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:122-136 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:123` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:254— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:254-268 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:284-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:254` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:312— RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:312-326 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:331-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:327` calls `preferredColorScheme` and `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:346` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) RevenueCatUI/View+PresentPaywall.swift:671— RevenueCatUI/View+PresentPaywall.swift:671-685 | RevenueCatUI/View+PresentPaywall.swift:968-982 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:671` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:19— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:19-33 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/InterstitialAdManager.swift:19-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:19` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:24— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:24-38 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:24-38 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:24— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:24-38 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:24-38 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) RevenueCatUI/Purchasing/WorkflowPreview.swift:28— RevenueCatUI/Purchasing/WorkflowPreview.swift:28-37 | RevenueCatUI/Purchasing/WorkflowPreview.swift:53-62 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Purchasing/WorkflowPreview.swift:28` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:780— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:780-789 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:929-938 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:780` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:940` calls `init` and `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:791` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) RevenueCatUI/Templates/V2/Components/Countdown/CountdownComponentView.swift:89— RevenueCatUI/Templates/V2/Components/Countdown/CountdownComponentView.swift:89-98 | RevenueCatUI/Templates/V2/Components/Countdown/CountdownComponentView.swift:105-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:338— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:338-347 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:455-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:492— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:492-501 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:526-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:492` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:322— RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:322-331 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:359-368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) Sources/Ads/Events/AdEventStore.swift:170— Sources/Ads/Events/AdEventStore.swift:170-179 | Sources/Events/FeatureEvents/FeatureEventStore.swift:214-223 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Ads/Events/AdEventStore.swift:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) Sources/Networking/Operations/GetHostedCheckoutStatusOperation.swift:38— Sources/Networking/Operations/GetHostedCheckoutStatusOperation.swift:38-47 | Sources/Networking/Operations/LogInOperation.swift:37-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) Sources/Purchasing/StoreKitAbstractions/Test Data/TestStoreProduct.swift:89— Sources/Purchasing/StoreKitAbstractions/Test Data/TestStoreProduct.swift:89-98 | Sources/Purchasing/StoreKitAbstractions/Test Data/TestStoreProduct.swift:138-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) RevenueCatUI/Templates/Template5View.swift:286— RevenueCatUI/Templates/Template5View.swift:286-299 | RevenueCatUI/Templates/Template7View.swift:426-439 — before extracting anything, compare `RevenueCatUI/Templates/Template5View.swift` and `RevenueCatUI/Templates/Template7View.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:332— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:332-345 | RevenueCatUI/Views/FooterView.swift:224-237 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:60— RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:60-73 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift:85-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:60` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:113— RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:113-126 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:147-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `ImageComponentViewModel` in one and `button` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/HeaderNestedHeroZLayerSafeAreaPreview.swift:240— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/HeaderNestedHeroZLayerSafeAreaPreview.swift:240-253 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/HeaderTextBodyHeroSafeAreaPreview.swift:192-205 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:14— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:14-27 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeVideoAdManager.swift:14-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/NativeAdManager.swift:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:33— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:33-46 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:33-46 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:33` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:40— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:40-53 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:31-44 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift` and `Examples/VanillaAdTrackingSample/Sources/HomeView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) RevenueCatUI/Modifiers/ViewExtensions.swift:121— RevenueCatUI/Modifiers/ViewExtensions.swift:121-128 | RevenueCatUI/Modifiers/ViewExtensions.swift:204-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Modifiers/ViewExtensions.swift:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Modifiers/ViewExtensions.swift:214` calls `scrollBounceBehaviorBasedOnSize` and `RevenueCatUI/Modifiers/ViewExtensions.swift:129` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:96— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:96-103 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:95-102 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) RevenueCatUI/Views/GradientView.swift:129— RevenueCatUI/Views/GradientView.swift:129-136 | RevenueCatUI/Views/GradientView.swift:146-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Views/GradientView.swift:129` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Sources/Misc/Concurrency/Purchases+async.swift:96— Sources/Misc/Concurrency/Purchases+async.swift:96-103 | Sources/Misc/Concurrency/Purchases+async.swift:106-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) Sources/Networking/Operations/PostExternalPurchaseTokenOperation.swift:62— Sources/Networking/Operations/PostExternalPurchaseTokenOperation.swift:62-69 | Sources/Networking/Operations/PostHostedCheckoutOperation.swift:70-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Networking/Operations/PostExternalPurchaseTokenOperation.swift:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Sources/CodableExtensions/PurchaseOwnershipType+Extensions.swift:60— Sources/CodableExtensions/PurchaseOwnershipType+Extensions.swift:60-67 | Sources/LocalRules/CustomerInfoDimensionProvider.swift:251-258 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) Sources/Networking/Operations/HealthReportAvailabilityOperation.swift:39— Sources/Networking/Operations/HealthReportAvailabilityOperation.swift:39-46 | Sources/Networking/Operations/HealthReportOperation.swift:39-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedDetailView.swift:56— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedDetailView.swift:56-63 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedInterstitialDetailView.swift:56-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:201— RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:201-207 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:251-257 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:268— RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:268-276 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:96-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:268` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) RevenueCatUI/View+PresentPaywallFooter.swift:44— RevenueCatUI/View+PresentPaywallFooter.swift:44-50 | RevenueCatUI/View+PresentPaywallFooter.swift:86-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywallFooter.swift:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/Networking/RCContainer+Element.swift:240— Sources/Networking/RCContainer+Element.swift:240-246 | Sources/Networking/RemoteConfigBlobRefHelpers.swift:38-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) Sources/Paywalls/Events/Networking/EventsRequest+CustomPaywallImpression.swift:76— Sources/Paywalls/Events/Networking/EventsRequest+CustomPaywallImpression.swift:76-82 | Sources/Paywalls/Events/Networking/EventsRequest+Paywall.swift:115-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Paywalls/Events/Networking/EventsRequest+CustomPaywallImpression.swift:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) RevenueCatUI/CustomerCenter/Views/UIKit Compatibility/CustomerCenterViewController.swift:247— RevenueCatUI/CustomerCenter/Views/UIKit Compatibility/CustomerCenterViewController.swift:247-253 | RevenueCatUI/UIKit/PaywallViewController.swift:699-705 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:511— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:511-517 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/WindowSizeConditionsPreview.swift:217-223 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:87— RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:87-93 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:129-135 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:52— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:52-60 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:51-59 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:933— RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:933-941 | RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:949-957 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:933` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:202— RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:202-210 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:280-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/InterstitialPresentation.swift:53— AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/InterstitialPresentation.swift:53-61 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/RewardedPresentation.swift:59-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) RevenueCatUI/Templates/V2/Components/Video/VideoPlayerLayerUIView.swift:58— RevenueCatUI/Templates/V2/Components/Video/VideoPlayerLayerUIView.swift:58-66 | RevenueCatUI/Templates/V2/Components/Video/VideoPlayerViewUIView.swift:45-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) Sources/Networking/Operations/HealthReportAvailabilityOperation.swift:29— Sources/Networking/Operations/HealthReportAvailabilityOperation.swift:29-37 | Sources/Networking/Operations/HealthReportOperation.swift:29-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) Sources/Purchasing/EntitlementInfo.swift:227— Sources/Purchasing/EntitlementInfo.swift:227-237 | Sources/Purchasing/InstallmentsInfo.swift:77-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Repeated repair: RevenueCatUI/Templates/V2/PaywallsV2View.swift RevenueCatUI/Templates/V2/PaywallsV2View.swift:411— RevenueCatUI/Templates/V2/PaywallsV2View.swift changed 19 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is PaywallsV2View.addPaywallModifiers at line 411), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(Paywalls) Package selection resolution on older OSes (#8226)”; “Fix(Paywalls) Package Selection/Resolution (#8145)”; “Fix video playback on inactive workflow pages (#8131)”; “Fix(Paywalls) Correct Hero Safe Area detection (#8126)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/PaywallsV2View.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift:80— RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is VideoComponentView.body at line 80), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix video controls intercepting taps outside the video (#8182)”; “Fix(Paywalls) Correct Hero Safe Area detection (#8126)”; “fix(paywalls): videos with fit width not rendering (#7958)”; “fix(paywalls): use video size for thumbnail overlay (#7918)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:182— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is TabViewModel.validatedSelection at line 182), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix(Paywalls) Package Selection/Resolution (#8145)”; “Fix(Paywalls) correctly identify tab content (#8198)”; “fix: avoid redacting packages without applicable offers (#8074)”; “Fix(Paywalls) Adjust loading state during eligibility check (#8055)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: RevenueCatUI/Templates/V2/ViewModelHelpers/PackageValidator.swift RevenueCatUI/Templates/V2/ViewModelHelpers/PackageValidator.swift:156— RevenueCatUI/Templates/V2/ViewModelHelpers/PackageValidator.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is PackageValidator.reconciledSelection at line 156), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix(Paywalls) Package Selection/Resolution (#8145)”; “fix: avoid redacting packages without applicable offers (#8074)”; “Fix(Paywalls) Adjust loading state during eligibility check (#8055)”; “fix(paywalls): don't leave a hidden package selected on paywalls with tabs (#7404)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/ViewModelHelpers/PackageValidator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:451— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is CarouselView.startAutoPlayIfNeeded at line 451), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix(Paywalls) Adjust loading state during eligibility check (#8055)”; “fix(paywalls): Match Android swipe behaviour for Paywalls V2 carousel (#7857)”; “Fix(Paywalls) Support Web Views in looping carousels (#7688)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: RevenueCatUI/Templates/V2/EnvironmentObjects/PackageContext.swift RevenueCatUI/Templates/V2/EnvironmentObjects/PackageContext.swift:123— RevenueCatUI/Templates/V2/EnvironmentObjects/PackageContext.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is PackageContext.activateSheet at line 123), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix(Paywalls) Package Selection/Resolution (#8145)”; “Fix relative discounts calculated from rounded monthly prices (#8062)”; “fix(paywalls): don't leave a hidden package selected on paywalls with tabs (#7404)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 15:42:29 +01:00' --until='2026-11-06 15:42:29 +01:00' --full-history --no-merges -- RevenueCatUI/Templates/V2/EnvironmentObjects/PackageContext.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×6
Members sharing a duplicated core (5 members, 50+ identical tokens) RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:135— RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:135-196 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:236-290 | RevenueCatUI/View+PresentPaywall.swift:522-572 | Sources/CustomerCenter/CustomerCenterConfigData.swift:792-822 | Sources/Identity/CustomerInfo.swift:333-361 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:132— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:132-156 | RevenueCatUI/Templates/V2/Components/Packages/Package/PackageVisibilityResolver.swift:54-90 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:121-145 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:92-116 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:188-212 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:523— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:523-870 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:339-394 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:108-163 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:76-131 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:138-193 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:520— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:520-557 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:383-407 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:390-414 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:338-357 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:229-266 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/Ads/Events/AdEvent.swift:367— Sources/Ads/Events/AdEvent.swift:367-382 | Sources/Ads/Events/AdEvent.swift:452-467 | Sources/Ads/Events/AdEvent.swift:537-552 | Sources/Ads/Events/AdRewardEvents.swift:128-142 | Sources/Ads/RewardVerification/RewardedAdTrackingMetadata.swift:40-54 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:98— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:98-109 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:111-122 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:59-70 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:72-83 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:196-215 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (12 lines × 2) RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:393— RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:393-404 | RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:412-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:393` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift:226— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift:226-237 | RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift:243-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift:226` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:546— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:546-557 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:255-266 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:546` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) RevenueCatUI/View+PresentPaywall.swift:164— RevenueCatUI/View+PresentPaywall.swift:164-175 | RevenueCatUI/View+PresentPaywall.swift:332-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:164` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) Sources/Misc/Obsoletions.swift:551— Sources/Misc/Obsoletions.swift:551-562 | Sources/Misc/Obsoletions.swift:571-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Projects/AutomatedSDKTestsApp/AutomatedSDKTestsApp/Sources/AutomatedSDKTestsApp/e2e-test-flows/Components/EntitlementView.swift:53— Projects/AutomatedSDKTestsApp/AutomatedSDKTestsApp/Sources/AutomatedSDKTestsApp/e2e-test-flows/Components/EntitlementView.swift:53-64 | Sources/Security/VerificationResult.swift:164-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (4 members, 50+ identical tokens) RevenueCatUI/Templates/Template2View.swift:170— RevenueCatUI/Templates/Template2View.swift:170-194 | RevenueCatUI/Templates/Template4View.swift:140-173 | RevenueCatUI/Templates/Template5View.swift:205-231 | RevenueCatUI/Templates/Template7View.swift:341-368 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:164— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:164-226 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:57-145 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:328-579 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:57-96 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) RevenueCatUI/View+PresentPaywall.swift:91— RevenueCatUI/View+PresentPaywall.swift:91-130 | RevenueCatUI/View+PresentPaywall.swift:233-281 | RevenueCatUI/View+PurchaseRestoreCompleted.swift:152-163 | Sources/Misc/Deprecations.swift:23-31 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) RevenueCatUI/View+PresentPaywall.swift:153— RevenueCatUI/View+PresentPaywall.swift:153-194 | RevenueCatUI/View+PresentPaywall.swift:321-364 | RevenueCatUI/View+PresentPaywall.swift:367-410 | RevenueCatUI/View+PresentPaywall.swift:456-490 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) RevenueCatUI/View+PresentPaywall.swift:664— RevenueCatUI/View+PresentPaywall.swift:664-716 | RevenueCatUI/View+PresentPaywall.swift:786-835 | RevenueCatUI/View+PresentPaywall.swift:962-1013 | RevenueCatUI/View+PresentPaywall.swift:1015-1063 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (17 lines × 2) AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/RewardVerification/RewardedAds+RewardVerification.swift:67— AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/RewardVerification/RewardedAds+RewardVerification.swift:67-83 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/RewardVerification/RewardedAds+RewardVerification.swift:140-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) RevenueCatUI/CustomerCenter/Views/RestorePurchasesAlert.swift:230— RevenueCatUI/CustomerCenter/Views/RestorePurchasesAlert.swift:230-246 | RevenueCatUI/CustomerCenter/Views/RestorePurchasesAlert.swift:250-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/RestorePurchasesAlert.swift:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17 lines × 2) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:797— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:797-813 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:831-847 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:797` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:388— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:388-404 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:395-411 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:388` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift:317— RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift:317-333 | Sources/Paywalls/PaywallColor.swift:105-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 3) RevenueCatUI/CustomerCenter/Data/PurchaseInformation+Mock.swift:69— RevenueCatUI/CustomerCenter/Data/PurchaseInformation+Mock.swift:69-84 | Sources/Purchasing/EntitlementInfo.swift:300-315 | Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:180-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Data/PurchaseInformation+Mock.swift:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) RevenueCatUI/PaywallView.swift:275— RevenueCatUI/PaywallView.swift:275-290 | RevenueCatUI/PaywallView.swift:553-568 | RevenueCatUI/Templates/V2/PaywallsV2View.swift:457-472 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/PaywallView.swift:275` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:531— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:531-546 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:592-607 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:670-685 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:531` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 3) RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:225— RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:225-240 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:246-261 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:291-306 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:263` calls `preferredColorScheme` and `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:242` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 3) Sources/Events/FeatureEvents/FeatureEvent.swift:129— Sources/Events/FeatureEvents/FeatureEvent.swift:129-144 | Sources/Events/FeatureEvents/FeatureEvent.swift:147-162 | Sources/Events/FeatureEvents/FeatureEvent.swift:165-180 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Events/FeatureEvents/FeatureEvent.swift:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:55— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:55-64 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:70-79 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:85-94 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:54— RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:54-63 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:69-78 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:84-93 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:74— RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:74-83 | RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:94-103 | RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:127-136 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:104` calls `padding`, `effectiveMargin` and `RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:137` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) Sources/Networking/AudiencesConfigProvider.swift:40— Sources/Networking/AudiencesConfigProvider.swift:40-49 | Sources/Networking/CheckpointsConfigProvider.swift:49-58 | Sources/Networking/SubscriberDimensionsConfigProvider.swift:47-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (10 lines × 3) RevenueCatUI/Templates/Template2View.swift:393— RevenueCatUI/Templates/Template2View.swift:393-402 | RevenueCatUI/Templates/Template5View.swift:419-428 | RevenueCatUI/Templates/Template7View.swift:558-567 — before extracting anything, compare `RevenueCatUI/Templates/Template2View.swift` and `RevenueCatUI/Templates/Template5View.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
TodoComment Tests/UnitTests/Networking/Backend/BackendGetRemoteConfigTests.swift:24— // TODO: Re-enable snapshots once the remote-config network stack is final. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/Networking/RemoteConfigManager.swift:342— /// TODO: Remove this interim scope once topic handler dispatch and SDK lifecycle wiring land. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/CustomerCenter/CustomerCenterConfigData.swift:953— // TODO: convert to Locale — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift:141— // TODO: Add cachedURL back to .id() once AVPlayer can swap — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
ClassTooLong: PurchasesOrchestrator Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:31— ClassTooLong — 833 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 400 significant lines; this is 433 over it, 2.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WorkflowPaywallView RevenueCatUI/Templates/V2/WorkflowPaywallView.swift:266— ClassTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 199 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ViewModelFactory RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift:27— ClassTooLong — 462 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 62 over it, 1.16× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PaywallsV2View RevenueCatUI/Templates/V2/PaywallsV2View.swift:39— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (27 lines × 2) RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:108— RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:108-134 | RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:127-153 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `RelevantPurchasesListViewModel` in one and `SubscriptionDetailViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (27 lines × 2) RevenueCatUI/View+PresentPaywall.swift:102— RevenueCatUI/View+PresentPaywall.swift:102-128 | RevenueCatUI/View+PresentPaywall.swift:245-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/View+PresentPaywall.swift:244` calls `Sendable` and `RevenueCatUI/View+PresentPaywall.swift:101` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (27 lines × 2) Sources/Ads/Events/AdEventStore.swift:179— Sources/Ads/Events/AdEventStore.swift:179-205 | Sources/Events/FeatureEvents/FeatureEventStore.swift:229-255 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Ads/Events/AdEventStore.swift:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/NativeDetailView.swift:7— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/NativeDetailView.swift:7-33 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/NativeVideoDetailView.swift:7-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24 lines × 2) RevenueCatUI/Templates/Template5View.swift:240— RevenueCatUI/Templates/Template5View.swift:240-263 | RevenueCatUI/Templates/Template7View.swift:380-403 — before extracting anything, compare `RevenueCatUI/Templates/Template5View.swift` and `RevenueCatUI/Templates/Template7View.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/Template5View.swift:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:280— RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:280-303 | RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:311-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/AppOpenDetailView.swift:7— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/AppOpenDetailView.swift:7-30 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/InterstitialDetailView.swift:7-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24 lines × 2) Examples/MagicWeather/MagicWeather/Sources/Helpers/SampleData.swift:44— Examples/MagicWeather/MagicWeather/Sources/Helpers/SampleData.swift:44-67 | Examples/MagicWeatherSwiftUI/MagicWeatherSwiftUI/Sources/Helpers/SampleData.swift:51-74 — before extracting anything, compare `Examples/MagicWeather/MagicWeather/Sources/Helpers/SampleData.swift` and `Examples/MagicWeatherSwiftUI/MagicWeatherSwiftUI/Sources/Helpers/SampleData.swift` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:182— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:182-200 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:254-272 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:345— RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:345-363 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:365-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:345` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:620— RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:620-638 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:652-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:620` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) Sources/Purchasing/Purchases/Purchases.swift:787— Sources/Purchasing/Purchases/Purchases.swift:787-805 | Sources/Purchasing/Purchases/Purchases.swift:825-843 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Purchasing/Purchases/Purchases.swift:787` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) RevenueCatUI/CustomerCenter/ButtonStyles.swift:115— RevenueCatUI/CustomerCenter/ButtonStyles.swift:115-130 | RevenueCatUI/CustomerCenter/ButtonStyles.swift:133-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:525— RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:525-540 | RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:548-563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:525` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:537— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:537-552 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:567-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:537` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:585` calls `HStack` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:555` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:135— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:135-150 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:168-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:135` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 3) RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:322— RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:322-336 | RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:339-353 | RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:356-370 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1111— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1111-1125 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1148-1162 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1185-1199 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:42— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:42-56 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:71-85 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:195-209 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:42` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 3) Sources/Ads/Events/AdEvent.swift:368— Sources/Ads/Events/AdEvent.swift:368-382 | Sources/Ads/Events/AdEvent.swift:453-467 | Sources/Ads/Events/AdEvent.swift:538-552 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Ads/Events/AdEvent.swift:368` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12–13 lines × 2) RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:401— RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:401-412 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:107-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:401` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:181— RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:181-192 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:257-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:273` calls `available` and `RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:196` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) Sources/Purchasing/Purchases/Purchases.swift:991— Sources/Purchasing/Purchases/Purchases.swift:991-1002 | Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:257-269 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (12–13 lines × 2) Examples/SampleCat/SampleCat/Screens/Checkpoints/EntitlementGateView.swift:55— Examples/SampleCat/SampleCat/Screens/Checkpoints/EntitlementGateView.swift:55-66 | Examples/SampleCat/SampleCat/Screens/Checkpoints/HardPaywallView.swift:44-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/SampleCat/SampleCat/Screens/Checkpoints/EntitlementGateView.swift:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:644— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:644-655 | RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:351-362 | RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:499-510 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:644` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 3) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:448— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:448-459 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:515-526 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:536-547 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:448` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/InterstitialPresentation.swift:171— AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/InterstitialPresentation.swift:171-182 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/RewardedPresentation.swift:259-270 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/RewardedPresentation.swift:272-283 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 3) Sources/Networking/Operations/GetCustomerInfoOperation.swift:51— Sources/Networking/Operations/GetCustomerInfoOperation.swift:51-63 | Sources/Networking/Operations/PostExternalPurchaseTokenOperation.swift:45-56 | Sources/Networking/Operations/PostHostedCheckoutOperation.swift:53-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Change-coupling hub: SK2StoreTransaction.swift → Deprecations.swift, PurchasesOrchestrator.swift, SK1StoreTransaction.swift Sources/Purchasing/StoreKitAbstractions/SK2StoreTransaction.swift— `Sources/Purchasing/StoreKitAbstractions/SK2StoreTransaction.swift` changes together with 3 other files — `Sources/Misc/Deprecations.swift`, `Sources/Purchasing/Purchases/PurchasesOrchestrator.swift`, `Sources/Purchasing/StoreKitAbstractions/SK1StoreTransaction.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: MockCustomerCenterPurchases.swift → CustomerCenterPurchases.swift, CustomerCenterViewModel.swift, CustomerCenterView.swift RevenueCatUI/CustomerCenter/Mocks/MockCustomerCenterPurchases.swift— `RevenueCatUI/CustomerCenter/Mocks/MockCustomerCenterPurchases.swift` changes together with 3 other files — `RevenueCatUI/CustomerCenter/Data/CustomerCenterPurchases.swift`, `RevenueCatUI/CustomerCenter/ViewModels/CustomerCenterViewModel.swift`, `RevenueCatUI/CustomerCenter/Views/CustomerCenterView.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: ImageComponentViewModel.swift → StackComponentView.swift, StackComponentViewModel.swift, TextComponentViewModel.swift RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift— `RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift` changes together with 3 other files — `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift`, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift`, `RevenueCatUI/Templates/V2/Components/Text/TextComponentViewModel.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Duplicated block (21 lines × 2) RevenueCatUI/Templates/V2/Components/Tabs/TabControlToggleComponentView.swift:157— RevenueCatUI/Templates/V2/Components/Tabs/TabControlToggleComponentView.swift:157-177 | RevenueCatUI/Templates/V2/Components/Tabs/TabControlToggleComponentView.swift:187-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Tabs/TabControlToggleComponentView.swift:157` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:55— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:55-75 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:55-75 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedDetailView.swift:10— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedDetailView.swift:10-30 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedInterstitialDetailView.swift:10-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/DetailViews/RewardedDetailView.swift:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) RevenueCatUI/Templates/V2/Components/Root/RootView.swift:371— RevenueCatUI/Templates/V2/Components/Root/RootView.swift:371-390 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/HeaderNestedHeroZLayerSafeAreaPreview.swift:63-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (20 lines × 2) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:941— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:941-960 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:963-982 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:325— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:325-344 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:362-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:325` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:361` calls `init` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:324` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18 lines × 2) RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:135— RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:135-152 | RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:166-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:97— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:97-114 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:221-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:54— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:54-71 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:54-71 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:57— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:57-70 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:141-154 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:57-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `button` in one and `TimelineComponentViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:537— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:537-550 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:567-580 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:854-867 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:537` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:585` calls `HStack` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:555` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:631— RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:631-644 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:663-676 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:681-694 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:631` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:54— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:54-62 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:69-77 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:84-92 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:97-105 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:106` calls `Spacer` and `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:63` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 4) RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:53— RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:53-61 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:68-76 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:83-91 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:96-104 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:105` calls `Spacer` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:62` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 4) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:851— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:851-860 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1113-1121 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1150-1158 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1187-1195 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:851` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:787— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:787-791 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:317-321 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:336-340 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:787` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:792` calls `init` and `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:322` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) RevenueCatUI/View+PresentPaywallFooter.swift:44— RevenueCatUI/View+PresentPaywallFooter.swift:44-48 | RevenueCatUI/View+PresentPaywallFooter.swift:86-90 | RevenueCatUI/View+PresentPaywallFooter.swift:221-225 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywallFooter.swift:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) Sources/Misc/Deprecations.swift:42— Sources/Misc/Deprecations.swift:42-46 | Sources/Misc/Deprecations.swift:52-56 | Sources/Misc/Deprecations.swift:275-279 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (33 lines × 2) RevenueCatUI/Templates/Template5View.swift:99— RevenueCatUI/Templates/Template5View.swift:99-131 | RevenueCatUI/Templates/Template7View.swift:134-166 — before extracting anything, compare `RevenueCatUI/Templates/Template5View.swift` and `RevenueCatUI/Templates/Template7View.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (33 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:165— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:165-197 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:133-165 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:74— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:74-98 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:73-97 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) RevenueCatUI/View+PresentPaywall.swift:689— RevenueCatUI/View+PresentPaywall.swift:689-713 | RevenueCatUI/View+PresentPaywall.swift:986-1010 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:689` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) RevenueCatUI/Purchasing/MockPurchases.swift:221— RevenueCatUI/Purchasing/MockPurchases.swift:221-242 | RevenueCatUI/Purchasing/MockPurchases.swift:258-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Purchasing/MockPurchases.swift:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (22 lines × 2) Examples/testCustomEntitlementsComputation/testCustomEntitlementsComputation/Sources/ContentView.swift:169— Examples/testCustomEntitlementsComputation/testCustomEntitlementsComputation/Sources/ContentView.swift:169-190 | Examples/testCustomEntitlementsComputation/testCustomEntitlementsComputation/Sources/ContentView.swift:211-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/testCustomEntitlementsComputation/testCustomEntitlementsComputation/Sources/ContentView.swift:169` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 5) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:132— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:132-145 | RevenueCatUI/Templates/V2/Components/Packages/Package/PackageVisibilityResolver.swift:54-67 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:121-134 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:92-105 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:188-201 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:128` calls `apply` and `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:117` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 5) Sources/Ads/Events/AdEvent.swift:367— Sources/Ads/Events/AdEvent.swift:367-380 | Sources/Ads/Events/AdEvent.swift:452-465 | Sources/Ads/Events/AdEvent.swift:537-550 | Sources/Ads/Events/AdRewardEvents.swift:128-141 | Sources/Ads/RewardVerification/RewardedAdTrackingMetadata.swift:40-53 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Ads/Events/AdEvent.swift:367` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 5) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:178— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:178-191 | RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:150-162 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:251-263 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:226-239 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:227-240 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 5) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:112— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:112-124 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:145-157 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:178-191 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:503-515 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:537-549 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 4) RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:89— RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:89-101 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:99-111 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:184-196 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:81-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 4) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:31— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:31-43 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:31-43 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:31-43 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:31-43 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:45` calls `enableRewardVerification` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:45` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 3) AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/AdMobInterstitialPresenter.swift:40— AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/AdMobInterstitialPresenter.swift:40-52 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/AdMobRewardedInterstitialPresenter.swift:46-58 | AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/AdMobRewardedPresenter.swift:46-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Sources/RevenueCatAdMob/Checkpoints/AdMobInterstitialPresenter.swift:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1127— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1127-1139 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1164-1176 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1202-1214 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 6) RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:527— RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:527-538 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:566-577 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:599-610 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:632-643 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:665-676 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:699-710 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:527` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 6) RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:249— RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:249-260 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:262-273 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:275-286 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:288-299 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:301-312 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:314-325 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:259` calls `background` and `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:246` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) RevenueCatUI/PaywallView.swift:112— RevenueCatUI/PaywallView.swift:112-123 | RevenueCatUI/PaywallView.swift:148-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/PaywallView.swift:112` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:107— RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:107-118 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:137-147 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift` and `RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:107` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 4) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:551— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:551-562 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:346-357 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:383-393 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:423-433 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:345` calls `environment` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:550` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 4) RevenueCatUI/View+PresentPaywallFooter.swift:91— RevenueCatUI/View+PresentPaywallFooter.swift:91-101 | RevenueCatUI/View+PresentPaywallFooter.swift:131-141 | RevenueCatUI/View+PresentPaywallFooter.swift:227-237 | RevenueCatUI/View+PresentPaywallFooter.swift:269-279 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywallFooter.swift:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/View+PresentPaywallFooter.swift:280` calls `default` and `RevenueCatUI/View+PresentPaywallFooter.swift:102` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–11 lines × 4) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:395— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:395-405 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:402-412 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:346-355 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:237-246 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 4) RevenueCatUI/View+PresentPaywall.swift:159— RevenueCatUI/View+PresentPaywall.swift:159-169 | RevenueCatUI/View+PresentPaywall.swift:327-337 | RevenueCatUI/View+PresentPaywall.swift:375-384 | RevenueCatUI/View+PresentPaywall.swift:461-471 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/View+PresentPaywall.swift:326` calls `Sendable` and `RevenueCatUI/View+PresentPaywall.swift:158` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:569— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:569-578 | RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:624-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:569` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:623` calls `environment`, `Spacer` and `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:569` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) Sources/RulesEngine/Value.swift:78— Sources/RulesEngine/Value.swift:78-87 | Sources/RulesEngine/Value.swift:108-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RulesEngine/Value.swift:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) RevenueCatUI/CustomerCenter/View+PresentCustomerCenter.swift:146— RevenueCatUI/CustomerCenter/View+PresentCustomerCenter.swift:146-154 | RevenueCatUI/CustomerCenter/View+PresentCustomerCenter.swift:224-232 | RevenueCatUI/CustomerCenter/Views/UIKit Compatibility/CustomerCenterViewController.swift:124-132 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:102— RevenueCatUI/Templates/V2/Components/Icon/IconComponentView.swift:102-110 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:298-306 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentView.swift:270-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `style` to `ImageComponentStyle) -> (width: Int` in one and `VideoComponentStyle) -> (width: Int` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8–9 lines × 2) RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:168— RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:168-175 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:188-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) RevenueCatUI/Views/GradientView.swift:138— RevenueCatUI/Views/GradientView.swift:138-146 | RevenueCatUI/Views/GradientView.swift:148-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Views/GradientView.swift:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Views/GradientView.swift:147` calls `preferredColorScheme` and `RevenueCatUI/Views/GradientView.swift:156` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:68— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:68-75 | RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:83-90 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:67-74 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:82-89 — before extracting anything, compare `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift` and `RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:45— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:45-53 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:74-82 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:198-206 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:325-332 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:45` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:213— RevenueCatUI/Templates/V2/Components/Packages/Package/PackageComponentView.swift:213-219 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:313-319 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:220-226 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) Sources/Networking/Operations/PostExternalPurchaseTokenOperation.swift:90— Sources/Networking/Operations/PostExternalPurchaseTokenOperation.swift:90-96 | Sources/Networking/Operations/PostHostedCheckoutOperation.swift:98-104 | Sources/Networking/Operations/PostIsPurchaseAllowedByRestoreBehaviorOperation.swift:97-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (11–13 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:51— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:51-61 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:52-64 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–13 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:51— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:51-61 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:52-64 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Sync-over-async blocking Sources/Misc/Concurrency/AsyncSleeper.swift:27— `sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
Sync-over-async blocking RevenueCatUI/Purchasing/PurchaseHandler+TestData.swift:135— `sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
VariablesV2.process (cyclomatic 107) RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:405— VariablesV2.process has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PurchaseStrings.description (cyclomatic 78) Sources/Logging/Strings/PurchaseStrings.swift:112— PurchaseStrings.description has cyclomatic complexity 78 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
OfferingStrings.description (cyclomatic 48) Sources/Logging/Strings/OfferingStrings.swift:63— OfferingStrings.description has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ConfigureStrings.description (cyclomatic 40) Sources/Logging/Strings/ConfigureStrings.swift:89— ConfigureStrings.description has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LoadedTabsComponentView.body (cyclomatic 28) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:328— LoadedTabsComponentView.body has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Purchases.init (cyclomatic 27) Sources/Purchasing/Purchases/Purchases.swift:354— Purchases.init has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PaywallComponent.containsUnsupportedConditions (cyclomatic 24) RevenueCatUI/Templates/V2/ViewModelHelpers/PresentedPartials.swift:473— PaywallComponent.containsUnsupportedConditions has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ViewModelFactory.toViewModel (cyclomatic 24) RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift:113— ViewModelFactory.toViewModel has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AppleReceiptBuilder.build (cyclomatic 22) Sources/LocalReceiptParsing/Builders/AppleReceiptBuilder.swift:35— AppleReceiptBuilder.build has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
InAppPurchaseBuilder.build (cyclomatic 22) Sources/LocalReceiptParsing/Builders/InAppPurchaseBuilder.swift:43— InAppPurchaseBuilder.build has cyclomatic complexity 22 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
PurchasesOrchestrator.performSK2Purchase (cyclomatic 21) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:834— PurchasesOrchestrator.performSK2Purchase has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlexHStack.body (cyclomatic 20) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:50— FlexHStack.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlexVStack.body (cyclomatic 20) RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:49— FlexVStack.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultCheckpointWorkflowResolver.attemptResolveConfiguredWorkflow (cyclomatic 19) Sources/Checkpoints/CheckpointWorkflowResolver.swift:178— DefaultCheckpointWorkflowResolver.attemptResolveConfiguredWorkflow has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkflowSkeleton.component (cyclomatic 19) RevenueCatUI/Templates/V2/ViewModelHelpers/WorkflowSkeleton.swift:69— WorkflowSkeleton.component has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
HTTPClient.handle (cyclomatic 18) Sources/Networking/HTTPClient/HTTPClient.swift:606— HTTPClient.handle has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HelpPath.hiddenReason (cyclomatic 17) RevenueCatUI/CustomerCenter/Actions/CustomerCenterConfigData.HelpPath+PurchaseInformation.swift:34— HelpPath.hiddenReason has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SKError.asPurchasesError (cyclomatic 17) Sources/Error Handling/SKError+Extensions.swift:19— SKError.asPurchasesError has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Code.trackingDescription (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
OfferingsManager.inferredPreviewProductType (cyclomatic 17) Sources/Purchasing/OfferingsManager.swift:538— OfferingsManager.inferredPreviewProductType has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StackComponentView.make (cyclomatic 16) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:193— StackComponentView.make has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D10 · Test Quality· Test project verifies nothing · ×1
Test project verifies nothing: APITesters Tests/APITesters/AllAPITests/AllAPITestsTests/AllAPITestsTests.swift:13— No conventional assertion call was detected in 1 of 1 tests in `APITesters` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D12 · Dependency Hygiene· Dependency not covered by the committed resolution · ×1
Dependency not covered by the committed resolution: swift-docc-plugin — `swift-docc-plugin` is declared in Package.swift but has no entry in the committed `Package.resolved` beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated `Package.resolved`.
D12 · Dependency Hygiene· No Package.resolved committed (Tuist/Package.swift) · ×1
No Package.resolved committed (Tuist/Package.swift) — Tuist/Package.swift declares 5 dependencies and no `.library` product, so it is an APPLICATION — but no `Package.resolved` is committed beside it. Nothing records the versions a working build resolved to, so `swift build` re-resolves against whatever each dependency's git host serves today and two builds of this commit are not guaranteed to be the same build. Build once and commit the resulting `Package.resolved`. (A published LIBRARY correctly omits its resolution — SwiftPM ignores a library's `Package.resolved` when the package is consumed — which is why this is asked only of a package that ships no `.library` product.)
Floating branch dependency: purchases-ios — Dependency `purchases-ios` is declared in Tuist/Package.swift against branch `main` — the declaration pins no immutable point, so `swift package update` moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (`from:`, `.upToNextMajor(from:)`, `exact:`) or to a `revision:` commit SHA.
FixmeComment RevenueCatUI/Templates/V2/ViewModelHelpers/ViewModelFactory.swift:337— // Fixme: use a an actual stack component returned by the backend — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
HackComment Projects/PaywallsTester/Project.swift:126— // hack to avoid having `PaywallsTester` visible in the scheme list (hidden: true) — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
VariablesV2.process (cognitive 108) RevenueCatUI/Templates/V2/Variables/VariableHandlerV2.swift:405— VariablesV2.process has cognitive complexity 108 (threshold 15). Drivers by points: if/else 51 (107 pts), match/switch 1 (nesting depth added 56). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LoadedTabsComponentView.body (cognitive 41) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:328— LoadedTabsComponentView.body has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Purchases.init (cognitive 40) Sources/Purchasing/Purchases/Purchases.swift:354— Purchases.init has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24 (29 pts), ternaries 6, boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FlexHStack.body (cognitive 35) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:50— FlexHStack.body has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FlexVStack.body (cognitive 35) RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:49— FlexVStack.body has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PurchasesOrchestrator.performSK2Purchase (cognitive 34) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:834— PurchasesOrchestrator.performSK2Purchase has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 6, match/switch 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HTTPClient.handle (cognitive 32) Sources/Networking/HTTPClient/HTTPClient.swift:606— HTTPClient.handle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SKError.asPurchasesError (cognitive 30) Sources/Error Handling/SKError+Extensions.swift:19— SKError.asPurchasesError has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 6 (19 pts), if/else 8 (11 pts) (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PaywallHeroLayoutResolver.firstVisibleLeaf (cognitive 24) RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallHeroLayout.swift:51— PaywallHeroLayoutResolver.firstVisibleLeaf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProductsFetcherSK2.populateSK2CompoundProductsIfSupported (cognitive 23) Sources/Purchasing/StoreKit2/ProductsFetcherSK2.swift:81— ProductsFetcherSK2.populateSK2CompoundProductsIfSupported has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (2 pts) (nesting depth added 13). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultCheckpointWorkflowResolver.attemptResolveConfiguredWorkflow (cognitive 22) Sources/Checkpoints/CheckpointWorkflowResolver.swift:178— DefaultCheckpointWorkflowResolver.attemptResolveConfiguredWorkflow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 5, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelevantPurchasesListView.content (cognitive 22) RevenueCatUI/CustomerCenter/Views/RelevantPurchasesListView.swift:145— RelevantPurchasesListView.content has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (9 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GestureCoordinatorHostView.handlePan (cognitive 21) RevenueCatUI/Templates/V2/Components/Carousel/ScrollViewGestureCoordinator.swift:122— GestureCoordinatorHostView.handlePan has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorSchemeRemoteImage.body (cognitive 20) RevenueCatUI/Views/RemoteImage.swift:223— ColorSchemeRemoteImage.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (18 pts), match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RemoteConfigBlobFetchScheduler.downloadVerifyAndStore (cognitive 19) Sources/Networking/RemoteConfigBlobFetcher.swift:143— RemoteConfigBlobFetchScheduler.downloadVerifyAndStore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OfferingsManager.inferredPreviewProductType (cognitive 19) Sources/Purchasing/OfferingsManager.swift:538— OfferingsManager.inferredPreviewProductType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AppStyleExtractor.extractProminentColors (cognitive 19) RevenueCatUI/Helpers/AppStyleExtractor.swift:142— AppStyleExtractor.extractProminentColors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultPaywallView.body (cognitive 19) RevenueCatUI/Views/DefaultPaywall/DefaultPaywallView.swift:115— DefaultPaywallView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeatureEventsRequest.init (cognitive 18) Sources/Events/FeatureEvents/Networking/FeatureEventsRequest.swift:25— FeatureEventsRequest.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CustomerInfoManager.customerInfo (cognitive 18) Sources/Identity/CustomerInfoManager.swift:116— CustomerInfoManager.customerInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AppleReceiptBuilder.build (cognitive 18) Sources/LocalReceiptParsing/Builders/AppleReceiptBuilder.swift:35— AppleReceiptBuilder.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteConfigManagerType.readConsistent (cognitive 18) Sources/Networking/RemoteConfigManager.swift:116— RemoteConfigManagerType.readConsistent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AlertOrConfirmationDialog.body (cognitive 18) RevenueCatUI/CustomerCenter/Views/RestorePurchasesAlert.swift:208— AlertOrConfirmationDialog.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PurchaseHistoryView.contentView (cognitive 18) RevenueCatUI/CustomerCenter/Views/PurchaseHistory/PurchaseHistoryView.swift:59— PurchaseHistoryView.contentView has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HelpPath.hiddenReason (cognitive 17) RevenueCatUI/CustomerCenter/Actions/CustomerCenterConfigData.HelpPath+PurchaseInformation.swift:34— HelpPath.hiddenReason has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 2 (4 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProcessInfo.platformString (cognitive 17) Sources/LocalReceiptParsing/Helpers/ProcessInfo+Extensions.swift:75— ProcessInfo.platformString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PurchaseStrings.description (cognitive 17) Sources/Logging/Strings/PurchaseStrings.swift:112— PurchaseStrings.description has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SubscriptionDetailView.content (cognitive 17) RevenueCatUI/CustomerCenter/Views/SubscriptionDetailView.swift:212— SubscriptionDetailView.content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PageControlView.body (cognitive 17) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:691— PageControlView.body has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApiDiffHelper.slack_summary (cognitive 17) fastlane/api_diff_helper.rb:733— ApiDiffHelper.slack_summary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AttributionPoster.post (cognitive 16) Sources/Attribution/AttributionPoster.swift:41— AttributionPoster.post has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PurchasesReceiptParser.findASN1Container (cognitive 16) Sources/LocalReceiptParsing/PurchasesReceiptParser.swift:100— PurchasesReceiptParser.findASN1Container has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OfferingStrings.description (cognitive 16) Sources/Logging/Strings/OfferingStrings.swift:63— OfferingStrings.description has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4 (7 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WorkflowStep.gating (cognitive 16) Sources/Networking/Responses/WorkflowsResponse.swift:89— WorkflowStep.gating has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrialOrIntroPriceEligibilityChecker.checkEligibility (cognitive 16) Sources/Purchasing/TrialOrIntroPriceEligibilityChecker.swift:66— TrialOrIntroPriceEligibilityChecker.checkEligibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PurchasesOrchestrator.storeKit2PurchaseIntentListener (cognitive 16) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1698— PurchasesOrchestrator.storeKit2PurchaseIntentListener has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), error handling 1 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PurchasesOrchestrator.syncPurchasesSK2 (cognitive 16) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1929— PurchasesOrchestrator.syncPurchasesSK2 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 1 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttributionDataMigrator.convertAppsFlyerAttribution (cognitive 16) Sources/SubscriberAttributes/AttributionDataMigrator.swift:99— AttributionDataMigrator.convertAppsFlyerAttribution has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), loops 1 (3 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FooterView.body (cognitive 16) RevenueCatUI/Views/FooterView.swift:79— FooterView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BottomSheetOverlayModifier.body (cognitive 16) RevenueCatUI/Templates/V2/Components/Button/BottomSheetView.swift:255— BottomSheetOverlayModifier.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApiDiffHelper.breaking_changes (cognitive 16) fastlane/api_diff_helper.rb:481— ApiDiffHelper.breaking_changes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FunctionTooLong: Project.swift.top-level code Projects/PaywallsTester/Project.swift:5— FunctionTooLong — top-level code runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Near-duplicate member family (5 members, 19 shared lines) · ×1
Near-duplicate member family (5 members, 19 shared lines) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:162— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:162-200 | RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:140-166 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:236-272 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:217-241 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:218-242 — These 5 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Near-duplicate member pair (69 shared lines) RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:50— RevenueCatUI/Templates/V2/Components/Stack/FlexHStack.swift:50-146 | RevenueCatUI/Templates/V2/Components/Stack/FlexVStack.swift:49-145 — These two members are variants of one another: 69 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (61 shared lines) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:30— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:30-302 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:474-583 — These two members are variants of one another: 61 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (23 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (23 members, 50+ identical tokens) Sources/Misc/Deprecations.swift:64— Sources/Misc/Deprecations.swift:64-71 | Sources/Misc/Deprecations.swift:73-80 | Sources/Misc/Deprecations.swift:82-89 | Sources/Misc/Deprecations.swift:91-98 | Sources/Misc/Deprecations.swift:100-107 | Sources/Misc/Deprecations.swift:109-116 | Sources/Misc/Deprecations.swift:118-125 | Sources/Misc/Deprecations.swift:127-134 | Sources/Misc/Deprecations.swift:136-143 | Sources/Misc/Deprecations.swift:145-152 | Sources/Misc/Deprecations.swift:154-161 | Sources/Misc/Deprecations.swift:163-170 | Sources/Misc/Deprecations.swift:172-179 | Sources/Misc/Deprecations.swift:181-188 | Sources/Misc/Deprecations.swift:190-197 | Sources/Misc/Deprecations.swift:199-206 | Sources/Misc/Deprecations.swift:208-215 | Sources/Misc/Deprecations.swift:217-224 | Sources/Misc/Deprecations.swift:226-233 | Sources/Misc/Deprecations.swift:235-242 | Sources/Misc/Deprecations.swift:244-251 | Sources/Misc/Deprecations.swift:253-260 | Sources/Misc/Deprecations.swift:262-270 — These 23 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 23 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 23 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:89— RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:89-134 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:53-97 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:99-127 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:131-182 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:184-212 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:81-145 | RevenueCatUI/Templates/V2/Components/WebView/WebViewComponentViewModel.swift:84-118 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Duplicated block (56 lines × 4) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:339— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:339-394 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:108-163 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:76-131 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:138-193 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (43 lines × 2) RevenueCatUI/View+PresentPaywall.swift:793— RevenueCatUI/View+PresentPaywall.swift:793-835 | RevenueCatUI/View+PresentPaywall.swift:1021-1063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:793` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–29 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:249— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:249-276 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:278-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:248` calls `environment`, `previewRequiredPaywallsV2Properties` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:278` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (25–26 lines × 2) RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:414— RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:414-438 | RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:463-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:414` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (26 lines × 2) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:627— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:627-652 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:702-727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:627` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 3) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:799— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:799-823 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:877-901 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:949-973 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:799` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:875` calls `init`, `hex` and `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:947` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (24 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:598— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:598-621 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:624-647 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:650-673 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:598` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–23 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:555— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:555-575 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:610-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:555` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:719— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:719-741 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:743-765 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20–21 lines × 3) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:454— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:454-474 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:477-497 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:500-519 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:185— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:185-205 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:213-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PackageVisibilityPreview.swift:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17–20 lines × 2) RevenueCatUI/Helpers/DualColorImageGenerator.swift:47— RevenueCatUI/Helpers/DualColorImageGenerator.swift:47-63 | RevenueCatUI/Helpers/DualColorImageGenerator.swift:84-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Helpers/DualColorImageGenerator.swift:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `size` to `CGSize = .init(width: 200, height: 200)` in one and `CGSize = .init(width: 50, height: 50)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19–20 lines × 2) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:642— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:642-660 | RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift:497-516 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:642` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18–20 lines × 2) RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:242— RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:242-259 | RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:285-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/BackgroundStyle.swift:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 3) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:492— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:492-510 | RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:525-543 | RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:551-569 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:492` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) RevenueCatUI/View+PresentPaywallFooter.swift:94— RevenueCatUI/View+PresentPaywallFooter.swift:94-112 | RevenueCatUI/View+PresentPaywallFooter.swift:230-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywallFooter.swift:94` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17–18 lines × 2) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:136— Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:136-152 | Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:229-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 5) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:563— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:563-579 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:586-602 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:609-625 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:661-677 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:684-700 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:563` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) RevenueCatUI/Templates/Template2View.swift:172— RevenueCatUI/Templates/Template2View.swift:172-188 | RevenueCatUI/Templates/Template4View.swift:142-158 | RevenueCatUI/Templates/Template5View.swift:207-223 — before extracting anything, compare `RevenueCatUI/Templates/Template2View.swift` and `RevenueCatUI/Templates/Template5View.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/Template2View.swift:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 3) RevenueCatUI/Views/DefaultPaywall/DefaultPaywallPreviews.swift:53— RevenueCatUI/Views/DefaultPaywall/DefaultPaywallPreviews.swift:53-69 | RevenueCatUI/Views/DefaultPaywall/DefaultPaywallPreviews.swift:87-102 | RevenueCatUI/Views/DefaultPaywall/DefaultPaywallPreviews.swift:109-124 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Views/DefaultPaywall/DefaultPaywallPreviews.swift:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:888— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:888-904 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:919-934 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:888` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 4) RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:180— RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:180-195 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:128-143 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:563-578 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:79-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `ButtonComponentViewModel` in one and `TimelineComponentViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15–16 lines × 3) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:545— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:545-559 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:638-653 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:713-728 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:545` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–15 lines × 9) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:768— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:768-782 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:801-815 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:835-849 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:58-71 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:87-100 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:182-195 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:211-224 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:240-253 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:270-283 — there are 9 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:768` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:57` calls `environment` and `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:800` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–15 lines × 7) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:880— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:880-894 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:911-925 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:120-133 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:153-166 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:477-490 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:511-524 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:545-558 — there are 7 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:880` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 4) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:453— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:453-467 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:476-490 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:499-513 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:520-534 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 3) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:67— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:67-80 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:76-90 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:66-79 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 6) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:536— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:536-549 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:566-579 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:597-610 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:623-636 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:649-662 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:675-688 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:536` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:550` calls `previewRequiredPaywallsV2Properties`, `previewLayout`, `previewDisplayName` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:612` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–14 lines × 5) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:525— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:525-538 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:586-599 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:664-677 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:314-323 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:350-359 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:525` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:585` calls `HStack` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:347` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 4) RevenueCatUI/View+PresentPaywall.swift:699— RevenueCatUI/View+PresentPaywall.swift:699-712 | RevenueCatUI/View+PresentPaywall.swift:821-834 | RevenueCatUI/View+PresentPaywall.swift:996-1009 | RevenueCatUI/View+PresentPaywall.swift:1049-1062 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:699` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/View+PresentPaywall.swift:713` calls `workflowExitOfferSource`, `resolveOffering` and `RevenueCatUI/View+PresentPaywall.swift:835` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–14 lines × 2) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:551— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:551-564 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:346-358 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:345` calls `environment` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:550` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–14 lines × 2) Sources/Networking/Operations/GetCustomerInfoOperation.swift:91— Sources/Networking/Operations/GetCustomerInfoOperation.swift:91-102 | Sources/Networking/Operations/PostRedeemWebPurchaseOperation.swift:84-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Networking/Operations/GetCustomerInfoOperation.swift:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 12) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:403— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:403-414 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:551-562 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:772-783 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:805-816 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:839-850 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:33-43 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:62-72 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:91-101 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:186-196 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:215-225 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:244-254 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:274-284 — there are 12 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:57` calls `environment` and `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:800` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 5) RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:165— RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:165-176 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:264-275 | RevenueCatUI/View+PresentPaywall.swift:542-553 | Sources/CustomerCenter/CustomerCenterConfigData.swift:807-818 | Sources/Identity/CustomerInfo.swift:347-358 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:627— RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:627-639 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:659-671 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:677-689 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:695-706 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:627` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–12 lines × 4) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:728— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:728-730 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:818-828 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:856-867 | RevenueCatUI/Templates/V2/ViewHelpers/BadgeModifier.swift:413-415 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–12 lines × 2) Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:784— Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:784-793 | Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:837-848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:784` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 6) RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:91— RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:91-100 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:53-63 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:101-110 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:131-141 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:186-195 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:83-92 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 6) RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:235— RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:235-245 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:247-257 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:273-283 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:286-296 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:299-309 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:312-322 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:235` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:285` calls `background` and `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:247` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:216— RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:216-226 | RevenueCatUI/Templates/V2/ViewHelpers/Shape.swift:500-510 | RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift:373-383 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:216` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 7) RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:237— RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:237-246 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:249-258 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:262-271 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:275-284 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:288-297 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:301-310 | RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:314-323 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:272` calls `background` and `RevenueCatUI/Templates/V2/ViewHelpers/ShadowModifier.swift:247` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 6) RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:514— RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:514-523 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:550-559 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:586-595 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:619-628 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:652-661 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:685-695 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:514` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 5) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:529— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:529-538 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:397-406 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:404-413 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:347-356 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/Template1Preview.swift:238-247 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:529` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 4) RevenueCatUI/Templates/Template2View.swift:173— RevenueCatUI/Templates/Template2View.swift:173-182 | RevenueCatUI/Templates/Template4View.swift:143-152 | RevenueCatUI/Templates/Template5View.swift:208-217 | RevenueCatUI/Templates/Template7View.swift:347-356 — before extracting anything, compare `RevenueCatUI/Templates/Template2View.swift` and `RevenueCatUI/Templates/Template5View.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/Template2View.swift:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 15) RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:845— RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:845-852 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:887-894 | RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:918-925 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:38-46 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:67-75 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:96-104 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:126-134 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:159-167 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:191-199 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:220-228 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:249-257 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:279-287 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:483-491 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:517-525 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:551-559 — there are 15 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 15 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift:845` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:259` calls `variable` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ConditionalConfigurabilityPreview.swift:48` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 12) RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:513— RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:513-521 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:526-534 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:549-557 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:565-573 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:585-593 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:598-606 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:618-626 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:631-639 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:651-659 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:664-672 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:684-692 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:698-706 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Image/ImageComponentView.swift:513` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 7) RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:92— RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:92-99 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:54-61 | RevenueCatUI/Templates/V2/Components/Image/ImageComponentViewModel.swift:102-109 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:132-139 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:187-194 | RevenueCatUI/Templates/V2/Components/Video/VideoComponentViewModel.swift:84-91 | RevenueCatUI/Templates/V2/Components/WebView/WebViewComponentViewModel.swift:85-93 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 6) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:762— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:762-769 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:771-778 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:840-847 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:849-856 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:911-918 | RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:920-927 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:762` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (4–8 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:807— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:807-810 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:811-818 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:826-833 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:811` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:818` calls `init`, `hex` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:810` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6–7 lines × 4) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1126— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1126-1132 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1163-1169 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1201-1207 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:413-418 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–7 lines × 2) RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift:135— RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift:135-141 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift:192-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift:135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 5) RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:165— RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:165-170 | RevenueCatUI/Templates/V2/Components/Icon/IconComponentViewModel.swift:143-148 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentViewModel.swift:239-244 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentViewModel.swift:220-225 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentViewModel.swift:221-226 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentViewModel.swift:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1120— RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1120-1125 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1157-1162 | RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1194-1199 | RevenueCatUI/Templates/V2/Components/Timeline/TimelineComponentView.swift:410-415 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Tabs/TabsComponentView.swift:1120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (2–6 lines × 3) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:820— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:820-825 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:839-840 | RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:841-846 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:820` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:840` calls `init`, `hex` and `RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:839` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:731— RevenueCatUI/Templates/V2/Components/Stack/StackComponentView.swift:731-735 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:372-377 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift:141-146 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/MultiTierPreview.swift:109-114 | RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/PurchaseButtonInPackagePreview.swift:171-176 — before extracting anything, compare `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift` and `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/FamilySharingTogglePreview.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/ButtonWithFooterPreview.swift:372` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (4–5 lines × 4) RevenueCatUI/View+PresentPaywall.swift:93— RevenueCatUI/View+PresentPaywall.swift:93-97 | RevenueCatUI/View+PresentPaywall.swift:235-239 | RevenueCatUI/View+PurchaseRestoreCompleted.swift:152-155 | Sources/Misc/Deprecations.swift:23-26 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `RevenueCatUI/View+PresentPaywall.swift:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) RevenueCatUI/CustomerCenter/Data/EntitlementInfo+Extensions.swift:18— RevenueCatUI/CustomerCenter/Data/EntitlementInfo+Extensions.swift:18-25 | Sources/CodableExtensions/PeriodType+Extensions.swift:50-57 | Sources/LocalRules/CustomerInfoDimensionProvider.swift:285-292 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 7) Sources/Error Handling/BackendError.swift:42— Sources/Error Handling/BackendError.swift:42-46 | Sources/Error Handling/BackendError.swift:48-52 | Sources/Error Handling/BackendError.swift:54-58 | Sources/Error Handling/BackendError.swift:60-64 | Sources/Error Handling/BackendError.swift:66-70 | Sources/Error Handling/BackendError.swift:79-83 | Sources/Purchasing/OfferingsManager.swift:686-692 — there are 7 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 23) Sources/Misc/Deprecations.swift:64— Sources/Misc/Deprecations.swift:64-68 | Sources/Misc/Deprecations.swift:73-77 | Sources/Misc/Deprecations.swift:82-86 | Sources/Misc/Deprecations.swift:91-95 | Sources/Misc/Deprecations.swift:100-104 | Sources/Misc/Deprecations.swift:109-113 | Sources/Misc/Deprecations.swift:118-122 | Sources/Misc/Deprecations.swift:127-131 | Sources/Misc/Deprecations.swift:136-140 | Sources/Misc/Deprecations.swift:145-149 | Sources/Misc/Deprecations.swift:154-158 | Sources/Misc/Deprecations.swift:163-167 | Sources/Misc/Deprecations.swift:172-176 | Sources/Misc/Deprecations.swift:181-185 | Sources/Misc/Deprecations.swift:190-194 | Sources/Misc/Deprecations.swift:199-203 | Sources/Misc/Deprecations.swift:208-212 | Sources/Misc/Deprecations.swift:217-221 | Sources/Misc/Deprecations.swift:226-230 | Sources/Misc/Deprecations.swift:235-239 | Sources/Misc/Deprecations.swift:244-248 | Sources/Misc/Deprecations.swift:253-257 | Sources/Misc/Deprecations.swift:262-266 — all 23 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:14— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:14-37 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/InterstitialAdManager.swift:14-37 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:24-49 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:24-49 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:24-50 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:24-50 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Duplicated block (24–25 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/Components/NativeAdViewRepresentable.swift:37— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/Components/NativeAdViewRepresentable.swift:37-60 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:303-327 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–18 lines × 5) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:100— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:100-109 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:113-122 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:61-70 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:74-83 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:198-215 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift` and `Examples/VanillaAdTrackingSample/Sources/HomeView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/HomeView.swift:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/Components/NativeAdViewRepresentable.swift:8— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/Components/NativeAdViewRepresentable.swift:8-22 | Examples/VanillaAdTrackingSample/Sources/HomeView.swift:271-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/Components/NativeAdViewRepresentable.swift:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 6) AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:18— AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:18-26 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/InterstitialAdManager.swift:18-26 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift:30-38 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift:30-38 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedAdManager.swift:30-38 | AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/VerifiedRewardedInterstitialAdManager.swift:30-38 — before extracting anything, compare `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedAdManager.swift` and `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/RewardedInterstitialAdManager.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `AdapterSDKs/RevenueCatAdMob/Examples/AdMobIntegrationSample/Sources/AdManagers/AppOpenAdManager.swift:18` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Off the main sequence: RevenueCat (SwiftPM) — RevenueCat (SwiftPM): abstractness 0.19, instability 0.00, distance 0.81 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
M1 · Documentation (README)· README may be stale · ×1
README may be stale — 662 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
Orphaned file Sources/Purchasing/StoreKit2/StoreKit2TransactionFetcher.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Support/PurchasesDiagnostics.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Purchasing/StoreKit1/ProductsFetcherSK1.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file RevenueCatUI/Templates/Other platforms/WatchTemplateView.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Attribution/AttributionPoster.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file RevenueCatUI/Views/TierSelectorView.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Misc/DateAndTime/TimingUtil.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/LocalReceiptParsing/BasicTypes/InAppPurchase.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Networking/HTTPClient/HTTPResponse.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Attribution/AttributionFetcher.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file RevenueCatUI/Views/IntroEligibilityStateView.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Support/DebugUI/DebugViewModel.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Purchasing/ReceiptFetcher.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Support/HealthReport+Validate.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Purchasing/StoreKitAbstractions/Test Data/TestStoreProduct.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/LocalReceiptParsing/Builders/ASN1ContainerBuilder.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Logging/Strings/AttributionStrings.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/LocalReceiptParsing/Builders/AppleReceiptBuilder.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Misc/Codable/DefaultDecodable.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/FoundationExtensions/Decoder+Extensions.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file RevenueCatUI/Helpers/ColorInformation+MultiScheme.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Purchasing/StoreKit2/SK2BeginRefundRequestHelper.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Support/BeginRefundRequestHelper.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/Networking/Operations/NetworkOperation.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate RevenueCatUI/Cache/WebBundlePrewarmer.swift:90— `!os(tvOS) && !os(watchOS) && canImport(WebKit)` appears character-identically in 3 files — RevenueCatUI/Cache/WebBundlePrewarmer.swift, RevenueCatUI/Cache/WebViewWebsiteDataStoreSweeper.swift, RevenueCatUI/Templates/V2/Components/WebView/WebViewInstance.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift:124— `(os(iOS) && !targetEnvironment(macCatalyst)) || VISION_OS` appears character-identically in 2 files — Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift, Sources/Purchasing/StoreKit1/StoreKit1Wrapper.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Purchasing/Purchases/Purchases.swift:3359— `DEBUG && !ENABLE_CUSTOM_ENTITLEMENT_COMPUTATION` appears character-identically in 3 files — Sources/Purchasing/Purchases/Purchases.swift, Sources/Support/DebugUI/DebugViewModel.swift, Sources/Support/SDKHealthManager.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Support/DebugUI/DebugContentViews.swift:14— `DEBUG && (os(iOS) || os(macOS) || VISION_OS)` appears character-identically in 4 files — Sources/Support/DebugUI/DebugContentViews.swift, Sources/Support/DebugUI/DebugView.swift, Sources/Support/DebugUI/DebugViewModel.swift, Sources/Support/DebugUI/DebugViewSheetPresentation.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Views/FooterView.swift:425— `DEBUG && canImport(SwiftUI) && canImport(UIKit)` appears character-identically in 2 files — RevenueCatUI/Views/FooterView.swift, RevenueCatUI/Views/PurchaseButton.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Purchasing/PresentationContext.swift:66— `canImport(AppKit) && !targetEnvironment(macCatalyst)` appears character-identically in 2 files — Sources/Purchasing/PresentationContext.swift, Sources/Purchasing/Purchases/PurchaseParams.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift:206— `canImport(SafariServices) && canImport(UIKit) .sheet(isPresented: .isNotNil(self.$inAppBrowserURL))` appears character-identically in 2 files — RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift, RevenueCatUI/Templates/V2/Components/Packages/PurchaseButton/PurchaseButtonComponentView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Checkpoints/CheckpointPresenter.swift:295— `canImport(UIKit) && !os(tvOS) && !os(watchOS)` appears character-identically in 7 files — RevenueCatUI/Checkpoints/CheckpointPresenter.swift, RevenueCatUI/Checkpoints/DefaultErrorPresenter.swift, RevenueCatUI/Checkpoints/FlowPresentationMode.swift, RevenueCatUI/Checkpoints/WorkflowPresenter.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift:217— `canImport(UIKit) && !os(watchOS) && !os(tvOS)` appears character-identically in 2 files — RevenueCatUI/Templates/V2/Components/Carousel/CarouselComponentView.swift, RevenueCatUI/Templates/V2/Components/Carousel/ScrollViewGestureCoordinator.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Purchasing/Purchases/PurchasesOrchestrator.swift:1575— `compiler(>=5.10) && !os(tvOS) && !os(watchOS) && !os(visionOS)` appears character-identically in 2 files — Sources/Purchasing/Purchases/PurchasesOrchestrator.swift, Sources/Purchasing/StoreKit2/StoreKit2PurchaseIntentListener.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift:312— `hexColor.count == 6 || hexColor.count == 8` appears character-identically in 2 files — RevenueCatUI/Templates/V2/ViewModelHelpers/PaywallComponentTypeTransformers.swift, Sources/Paywalls/PaywallColor.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Checkpoints/Purchases+Checkpoints.swift:18— `os(iOS) && !targetEnvironment(macCatalyst)` appears character-identically in 3 files — RevenueCatUI/Checkpoints/Purchases+Checkpoints.swift, RevenueCatUI/Templates/V2/Components/Button/ButtonComponentView.swift, RevenueCatUI/Templates/V2/Components/Button/ButtonComponentViewModel.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Misc/Concurrency/Purchases+nonasync.swift:65— `os(iOS) || targetEnvironment(macCatalyst) || VISION_OS` appears character-identically in 9 files — Sources/Misc/Concurrency/Purchases+nonasync.swift, Sources/Purchasing/Purchases/Purchases.swift, Sources/Purchasing/Purchases/PurchasesOrchestrator.swift, Sources/Purchasing/Purchases/PurchasesType.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/Misc/MacDevice.swift:14— `os(macOS) || targetEnvironment(macCatalyst)` appears character-identically in 3 files — Sources/Misc/MacDevice.swift, Sources/Misc/MapAppStoreDetector.swift, Sources/Misc/SandboxEnvironmentDetector.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/Templates/Template1View.swift:28— `swift(>=5.9) || (!os(macOS) && !os(watchOS) && !os(tvOS))` appears character-identically in 7 files — RevenueCatUI/Templates/Template1View.swift, RevenueCatUI/Templates/Template2View.swift, RevenueCatUI/Templates/Template3View.swift, RevenueCatUI/Templates/Template4View.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/View+ExitOfferPresentation.swift:138— `targetEnvironment(macCatalyst) || os(macOS) .frame(minHeight: 667)` appears character-identically in 2 files — RevenueCatUI/View+ExitOfferPresentation.swift, RevenueCatUI/View+PresentPaywall.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift:462— `unsubscribeDetectedAt != nil && !willRenew` appears character-identically in 2 files — RevenueCatUI/CustomerCenter/Data/PurchaseInformation.swift, RevenueCatUI/CustomerCenter/Data/Transaction.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 40 significant file(s) lose their only recent owner: Sources/Purchasing/Purchases/TransactionPoster.swift, RevenueCatUI/Purchasing/HostedCheckout.swift, RevenueCatUI/Templates/V2/Components/WebView/WebViewScrollGestureArbitration.swift, Sources/RulesEngine/Value.swift, Sources/RulesEngine/Operators/AccessorOperators.swift, RevenueCatUI/WebCheckout/WebCheckoutViewModel.swift, Sources/Purchasing/HostedCheckout/HostedCheckoutPoller.swift, Sources/Purchasing/ExternalPurchase/ExternalPurchaseManager.swift (+32 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 18 significant file(s) lose their only recent owner: Sources/Networking/RCContainer+Parser.swift, Sources/Networking/RCContainer+Element.swift, Sources/Networking/RemoteConfigBlobStore.swift, Sources/LocalRules/DimensionResolver.swift, Sources/Networking/RemoteConfigAPI.swift, RevenueCatUI/Checkpoints/PaywallPresenter.swift, Sources/Networking/SDKSettingsConfigProvider.swift, Sources/Checkpoints/Checkpoints.swift (+10 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 11 significant file(s) lose their only recent owner: RevenueCatUI/Helpers/ColorComputationHelpers.swift, RevenueCatUI/Templates/V2/Previews/PaywallPreviewRenderer.swift, RevenueCatUI/Templates/V2/Components/WebView/PaywallWebViewStaticContext.swift, RevenueCatUI/Helpers/DualColorImageGenerator.swift, RevenueCatUI/Helpers/PaywallWarning.swift, RevenueCatUI/Cache/WebBundleCacheCoordinator.swift, RevenueCatUI/Cache/WebViewWebsiteDataStoreSweeper.swift, RevenueCatUI/Templates/V2/Components/Text/MarkdownUnderlineFormatter.swift (+3 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 11 significant file(s) lose their only recent owner: RevenueCatUI/Templates/V2/ViewModelHelpers/WorkflowSkeleton.swift, RevenueCatUI/Templates/V2/ViewModelHelpers/WorkflowNavigator.swift, RevenueCatUI/View+ExitOfferPresentation.swift, Sources/Misc/DateAndTime/ISODurationFormatter.swift, Projects/AutomatedSDKTestsApp/AutomatedSDKTestsApp/Sources/AutomatedSDKTestsApp/ContentView.swift, Sources/Purchasing/BranchResolver.swift, Projects/AutomatedSDKTestsApp/AutomatedSDKTestsApp/Sources/AutomatedSDKTestsApp/e2e-test-flows/open-workflow-uikit.swift, RevenueCatUI/CustomerCenter/Views/CompatibilityLabeledContent.swift (+3 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 7 significant file(s) lose their only recent owner: Sources/Authentication/Authentication.swift, RevenueCatUI/Purchases+PreviewPaywall.swift, Sources/Networking/Operations/TokenOperations.swift, Sources/Security/Keychain.swift, Sources/Networking/HTTPClient/TokenManager.swift, Sources/Identity/Identity.swift, Sources/Networking/TokenAPI.swift. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 5 significant file(s) lose their only recent owner: Sources/Purchasing/StoreKit2/Win-Back Offers/WinBackEligibilityAdapters.swift, Sources/Purchasing/StoreKit2/Win-Back Offers/WinBackOfferEligibilityCalculator.swift, RevenueCatUI/CustomerCenter/Views/Virtual Currencies/VirtualCurrenciesScrollViewWithOSBackgroundSection.swift, Sources/Error Handling/SKError+Extensions.swift, RevenueCatUI/CustomerCenter/Views/Virtual Currencies/VirtualCurrencyBalancesScreen.swift. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 3 significant file(s) lose their only recent owner: RevenueCatUI/Templates/V2/Previews/TemplateComponentsViewPreviews/RootViewScrollLayoutPreview.swift, Sources/Purchasing/StoreKit2/Observer Mode/StoreKit2ObserverModePurchaseDetector.swift, RevenueCatUI/Helpers/StoreProduct+Extensions.swift. Pair on, review, or document these before any departure.
Silent fallback default in catch Sources/LocalReceiptParsing/BasicTypes/AppleReceipt.swift:141— `debugDescription` turns every thrown error into `"<null>"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/LocalReceiptParsing/BasicTypes/InAppPurchase.swift:205— `debugDescription` turns every thrown error into `"<null>"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/Support/DebugUI/DebugContentViews.swift:561— `json` turns every thrown error into `"{}"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (102 single-owned of 674 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 674 of the 1033 production source files in this repository met that bar). They are anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)), anonymized user #10 (1 file(s)), anonymized user #11 (1 file(s)), anonymized user #12 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: RevenueCatUI/Templates/V2/EnvironmentObjects/PaywallStateStore.swift, Sources/Paywalls/Components/Common/StateDeclaration.swift, RevenueCatUI/Templates/V2/Components/Video/VideoAudioSessionHandler.swift, Sources/Misc/Concurrency/SynchronizedUserDefaults.swift, Sources/Ads/RewardVerification/Networking/RewardVerificationStatusResponse.swift, RevenueCatUI/PaywallInteractionEvent.swift, Projects/AutomatedSDKTestsApp/AutomatedSDKTestsApp/Sources/AutomatedSDKTestsApp/e2e-test-flows/open-developer-provided-offering.swift.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 2.0/10. The most over is `(repository root)` (129675 LoC, 1511 module-visible types across 119 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 89 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: Sources/Purchasing/StoreKit2/StoreKit2TransactionFetcher.swift, Sources/Support/PurchasesDiagnostics.swift, Sources/Purchasing/StoreKit1/ProductsFetcherSK1.swift, RevenueCatUI/Templates/Other platforms/WatchTemplateView.swift, Sources/Attribution/AttributionPoster.swift, RevenueCatUI/Views/TierSelectorView.swift, Sources/Misc/DateAndTime/TimingUtil.swift, Sources/LocalReceiptParsing/BasicTypes/InAppPurchase.swift (and 81 more) (91 orphaned of 674 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 674 of the 1033 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
ED3 · Event naming· Event not named in past tense · ×1
Event not named in past tense: close Sources/Paywalls/Events/WorkflowEvent.swift:17— `close` is an imperative name inside a domain-event set whose siblings are past-tense facts — it reads as an intent, not something that happened. Name it for the event that occurred (e.g. `itemAdded`) so the event log records facts.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 3/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
No SAST .github/workflows/actionlint.yml:6— No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 125760 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
X5 · Nullable reference types· Ruby's type checker does not check nil everywhere · ×1
Ruby's type checker does not check nil everywhere — This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 4 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
Outdated: flyingfox — `flyingfox` is resolved at 0.16.0, but 0.27.1 is the newest release tagged on https://github.com/swhitty/FlyingFox.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update flyingfox` reaches this one with no change to Package.swift.
Outdated: nimble — `nimble` is resolved at 13.7.1, but 13.8.0 is the newest release tagged on https://github.com/quick/nimble within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update nimble` reaches this one with no change to Package.swift.
Outdated: snapshotpreviews — `snapshotpreviews` is resolved at 0.11.0, but 0.20.0 is the newest release tagged on https://github.com/EmergeTools/SnapshotPreviews.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update snapshotpreviews` reaches this one with no change to Package.swift.
Outdated: swift-custom-dump — `swift-custom-dump` is resolved at 1.4.1, but 1.7.3 is the newest release tagged on https://github.com/pointfreeco/swift-custom-dump within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-custom-dump` reaches this one with no change to Package.swift.
Outdated: swift-snapshot-testing — `swift-snapshot-testing` is resolved at 1.18.9, but 1.19.7 is the newest release tagged on https://github.com/pointfreeco/swift-snapshot-testing within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-snapshot-testing` reaches this one with no change to Package.swift.
Outdated: xctest-dynamic-overlay — `xctest-dynamic-overlay` is resolved at 1.9.0, but 1.13.1 is the newest release tagged on https://github.com/pointfreeco/xctest-dynamic-overlay within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update xctest-dynamic-overlay` reaches this one with no change to Package.swift.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 23 file(s) — `Examples/SampleCat/SampleCat/Utils/Views/ConceptIntroductionView.swift`, `Examples/SampleCat/SampleCat/Utils/Views/ContentBackgroundView.swift`, `RevenueCatUI/Checkpoints/CheckpointsManager.swift`, `RevenueCatUI/CustomerCenter/Data/SemanticVersion.swift`, `RevenueCatUI/CustomerCenter/ViewModels/BaseManageSubscriptionViewModel.swift`, … (+18 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1b161-de10-79c3-baec-deedf03f5f9a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 26 · Warnings: 543 · Recommendations: 127 · Info: 6 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 06-11-2026 @ 15:02 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.