Public report — Snapzy, published 30 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_052c78396bc446ba8af907c1da5b3590 Filed 30 September 2026, 22:47 UTC Public

Duongductrong/Snapzy

Measured 30 September 2026, 22:34 UTC

60% Adequate
CriticalWeakAdequateStrongExemplary

Large · 146,705 LoC · rebuild ~1.3 person-years · weakest lens: Readiness (49%)

Findings by grade

19 critical 865 serious 17 minor 48 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
30 September 2026, 22:34 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

35/38dimensions tool-verifieddeterministic · confidence 1.0 · 3 LLM-assisted, advisory
884findings with an exact file:lineof 901 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
38/126dimensions across the health lenses146705 LoC — wide & deep
Chapters

Executive summary

The system holds an adequate standing with a score of 60%, reflecting a large, valuable asset that is currently carrying significant operational risk. With approximately 146,000 lines of production code and a rebuild cost of roughly €200,000, the business has substantial value tied up here. While the underlying code structure is sound, the system’s ability to operate safely and reliably in production is compromised, creating a fragile foundation for future delivery speed and stability.

The primary risk stems from low production readiness, which sits at 49%. This gap means the system lacks the essential safety nets, such as automated health checks and immutable deployment tags, required to prevent outages and ensure quick recovery. Without these controls, any incident becomes more costly to resolve and more disruptive to users, directly threatening service reliability and increasing the potential for extended downtime.

Security exposure presents another critical concern, particularly regarding leaked secrets and the absence of automated code scanning in the development pipeline. Although the overall security score is moderate, the presence of confirmed secret leaks and the lack of continuous static analysis create a tangible threat. This leaves the organization vulnerable to data breaches and compliance failures, as security regressions can slip into production unnoticed, requiring manual intervention to detect and fix.

Despite these risks, the codebase demonstrates genuine strength in its architectural design and code health, both scoring above 80%. This indicates that the core logic is maintainable and well-structured, making it easier for new teams to understand and modify. The high maturity score further suggests that the domain modeling is clear, reducing the long-term cost of change and supporting sustainable growth.

To maximize leverage, the immediate focus must be on integrating automated security scanning into the continuous integration pipeline and resolving the identified secret leaks. These actions provide the highest return on effort by preventing future vulnerabilities and securing current assets. Addressing these issues first will stabilize the system, reduce exposure, and create a safer environment for ongoing development and deployment.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 49% · 46% weightPerformance 61% · 25% weightMaturity 72% · 14% weightSecurity 77% · 8% weightDomain Modelling 82% · 4% weightCode Health 86% · 2% weightArchitecture 95% · 1% weight

Raise Readiness 49 → 70 (the Healthy floor) ⇒ headline 60 → ~68.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

258 finding(s) are new versus the previous scan (2026-09-14) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · CloudCredentialFormView.body (cyclomatic 29) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift
  • D1 · QuickAccessCardView.body (cyclomatic 26) Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift
  • D1 · CaptureSettingsView.body (cyclomatic 25) Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift
  • D1 · AnnotateCanvasView.body (cyclomatic 23) Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift
  • D1 · LiquidGlassSegmentedControl.body (cyclomatic 22) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSegmentedControl.swift
  • D1 · InlineAreaAnnotateRootView.body (cyclomatic 21) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift
  • D1 · AnnotateState.updateDefaultAnnotationProperties (cyclomatic 19) Snapzy/Features/Annotate/AnnotateState.swift
  • D1 · DrawingCanvasNSView.applyGestureResize (cyclomatic 18) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift
  • D1 · ToolError.errorDescription (cyclomatic 17) tools/localization/CatalogTool.swift
  • D1 · VideoEditorState.restoreSessionIfNeeded (cyclomatic 17) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D1 · VideoEditorState.scheduleSpeedPreviewRebuild (cyclomatic 17) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D1 · SnapzyOnboardingBarSegment.body (cyclomatic 17) Snapzy/Features/Onboarding/Components/SnapzyOnboardingActionBar.swift
  • D1 · LiquidGlassBarSegment.body (cyclomatic 17) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassActionBar.swift
  • D1 · LiquidGlassSurface.body (cyclomatic 17) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift
  • D1 · VideoEditorState.play (cyclomatic 16) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D1 · AreaSelectionOverlayView.handlePrimaryMouseUp (cyclomatic 16) Snapzy/Services/Capture/AreaSelectionWindow.swift
  • D1 · AnnotateBottomBarView.annotateActionButtons (cyclomatic 16) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift
  • D1 · DrawingCanvasNSView.resizeHandleRects (cyclomatic 16) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift
  • D1 · VideoEditorClipStripView.bodyGesture (cyclomatic 16) Snapzy/Features/VideoEditor/Components/VideoEditorClipStripView.swift
  • D2 · CloudCredentialFormView.body (cognitive 45) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift
  • D2 · CaptureSettingsView.body (cognitive 34) Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift
  • D2 · ShortcutsSettingsView.body (cognitive 33) Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift
  • D2 · InlineAreaAnnotateRootView.body (cognitive 29) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift
  • D2 · QuickAccessCardView.body (cognitive 28) Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift
  • D2 · VideoEditorState.makeSpeedPreviewItem (cognitive 27) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D2 · AreaSelectionOverlayView.handlePrimaryMouseUp (cognitive 27) Snapzy/Services/Capture/AreaSelectionWindow.swift
  • D2 · VideoEditorCameraCPUProbe.main (cognitive 24) scripts/swift-tools/video-editor-performance/camera-cpu-probe.swift
  • D2 · AnnotateCanvasView.body (cognitive 23) Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift
  • D2 · LiquidGlassSurface.body (cognitive 23) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift
  • D2 · LiquidGlassSegmentedControl.body (cognitive 22) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSegmentedControl.swift
  • D2 · VideoEditorState.play (cognitive 21) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D2 · VideoEditorState.scheduleSpeedPreviewRebuild (cognitive 21) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D2 · VideoEditorState.restoreSessionIfNeeded (cognitive 20) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D2 · WindowSelectionQueryService.captureImmediateQuickLookCaptures (cognitive 20) Snapzy/Services/Capture/WindowSelectionQueryService.swift
  • D2 · AnnotateBottomBarView.annotateActionButtons (cognitive 20) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift
  • D2 · CloudSettingsView.configuredView (cognitive 20) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift
  • D2 · VideoEditorSessionStore.persistWrite (cognitive 20) Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift
  • D2 · MockupExportViewForAnnotate.backgroundLayer (cognitive 19) Snapzy/Features/Annotate/Services/AnnotateExporter.swift
  • D2 · ShortcutsView.body (cognitive 19) Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift
  • D2 · VideoEditorBottomBar.body (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift
  • D2 · VideoEditorClipStripView.bodyGesture (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorClipStripView.swift
  • D2 · SpeedTimelineTrack.interactionSegment (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift
  • D2 · ZoomTimelineTrack.interactionSegment (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift
  • D2 · VideoEditorState.recalculateEstimatedFileSize (cognitive 18) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D2 · LiquidGlassBarSegment.body (cognitive 18) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassActionBar.swift
  • D2 · LiquidGlassButtonSurface.currentSubstrate (cognitive 18) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift
  • D2 · LiquidGlassButtonSurface.currentTint (cognitive 18) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift
  • D2 · ScreenCaptureManager.captureDisplaySnapshotsCore (cognitive 17) Snapzy/Services/Capture/ScreenCaptureManager.swift
  • D2 · SnapzyOnboardingBarSegment.body (cognitive 17) Snapzy/Features/Onboarding/Components/SnapzyOnboardingActionBar.swift
  • D2 · VideoEditorState.seekPlayerInternally (cognitive 16) Snapzy/Features/VideoEditor/VideoEditorState.swift
  • D2 · CloudSettingsView.cloudStatsSection (cognitive 16) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift
  • D2 · VideoEditorExporter.addAudioTracks (cognitive 16) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift
  • D3 · MethodTooLong: ShortcutsSettingsView.body Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift
  • D3 · MethodTooLong: CaptureSettingsView.body Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift
  • D3 · MethodTooLong: CloudCredentialFormView.body Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift
  • D3 · FileTooLong: LiquidGlass/LiquidGlassPreview.swift Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift
  • D3 · ClassTooLong: LiquidGlassPlaygroundView Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift
  • D3 · MethodTooLong: InlineAreaPropertiesBar.body Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift
  • D3 · MethodTooLong: ShortcutsView.body Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift
  • D3 · MethodTooLong: HistorySettingsView.body Snapzy/Features/Preferences/Components/PreferencesHistorySettingsView.swift
  • D3 · TooManyMethods: View Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift
  • D3 · MethodTooLong: AdvancedSettingsView.body Snapzy/Features/Preferences/Components/PreferencesAdvancedSettingsView.swift
  • D3 · MethodTooLong: CloudSettingsView.cloudStatsSection Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift
  • D3 · FileTooLong: Components/VideoEditorSpeedTimelineTrack.swift Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift
  • D3 · FileTooLong: Managers/RecordingCameraOverlayWindow.swift Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift
  • D3 · ClassTooLong: AnnotateBottomBarView Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift
  • D3 · MethodTooLong: ScrollingCaptureSelectionGuidanceKind.guidance Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureTypes.swift
  • D3 · MethodTooLong: QuickAccessSettingsView.body Snapzy/Features/Preferences/Components/PreferencesQuickAccessSettingsView.swift
  • D4 · Near-duplicate member family (3 members, 17 shared lines) Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift
  • D4 · Near-duplicate member pair (31 shared lines) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift
  • D4 · Edited copy of a member (57 corresponding lines) Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift
  • D4 · Edited copy of a member (16 corresponding lines) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) Snapzy/Features/History/Components/HistoryCardView.swift
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) Snapzy/Features/Capture/CaptureViewModel.swift
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) Snapzy/Features/History/Managers/HistoryFloatingPanelController.swift
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift
  • D4 · Duplicated block (54 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift
  • D4 · Duplicated block (50 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift
  • D4 · Duplicated block (38–39 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift
  • D4 · Duplicated block (36–38 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift
  • D4 · Duplicated block (33–38 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift
  • D4 · Duplicated block (33–36 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift
  • D4 · Duplicated block (35–36 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift
  • D4 · Duplicated block (35 lines × 2) Snapzy/Features/Annotate/Components/AnnotateMockupCanvasView.swift
  • D4 · Duplicated block (34 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift
  • D4 · Duplicated block (32 lines × 2) Snapzy/Features/History/Components/HistoryCardView.swift
  • D4 · Duplicated block (28–30 lines × 2) Snapzy/Features/Annotate/Components/AnnotateMockupPresetBar.swift
  • D4 · Duplicated block (26–27 lines × 2) Snapzy/Features/Annotate/Services/AnnotateMockup3DRenderer.swift
  • D4 · Duplicated block (25–27 lines × 2) Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift
  • D4 · Duplicated block (27 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift
  • D4 · Duplicated block (24 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift
  • D4 · Duplicated block (20–23 lines × 2) Snapzy/Services/Capture/WindowSelectionQueryService.swift
  • D4 · Duplicated block (23 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift
  • D4 · Duplicated block (22 lines × 2) Snapzy/Features/History/Components/HistoryToolbar.swift
  • D4 · Duplicated block (20 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift
  • D4 · Duplicated block (20 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift
  • D4 · Duplicated block (11–20 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €65,000–€330,000
Cost to rebuild€65,000–€330,000 (0.6–2.0 person-years (1,080–3,426 h), ~1–3 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.8× (at 60% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~1.3 person-years of build effort (about ~€200,000 to rebuild). Its weakest lens is Readiness at 49% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
+9.8 pts · Low effort · Secret Scanning
2
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.
+9.8 pts · Medium effort · Security & performance tooling
3
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
+9.8 pts · Medium effort · Deployment & Rollback

Diagnosis — what's actually going on

Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~1.3 person-years to rebuild), and its weakest lens is Readiness at 49%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~1.3 person-years rebuild (146,705 LoC) · weakest lens: Readiness 49%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: 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. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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.

At a glance — Code Health · 86% · Strong ·

At a glance — Architecture · 95% · Exemplary ·

At a glance — Maturity · 72% · Strong ·

At a glance — Readiness · 49% · Weak · gated by D13, P3 ·

At a glance — Security · 77% · Adequate · gated by D36 ·

At a glance — Domain Modelling · 82% · Strong ·

At a glance — Performance · 61% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A03:2021 — Injection12High / Critical
A05:2021 — Security Misconfiguration3High / Critical
A02:2021 — Cryptographic Failures2High / Critical

Roadmap

First, integrate automated security scanning into the CI pipeline to block regressions and immediately resolve the identified secret leaks in the codebase. Next, implement health checks and immutable image tags to ensure reliable deployments and straightforward rollbacks. Finally, establish observability through tracing and metrics, and document disaster recovery procedures to guarantee operational resilience.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.+9.8 ptsLowSecret Scanning
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.+9.8 ptsMediumSecurity & performance tooling
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.+9.8 ptsMediumDeployment & Rollback
Consider OpenTelemetry tracing/metrics (swift-otel with swift-distributed-tracing) and a health-check endpoint (a /health route on your Vapor/Hummingbird router) for operability.+9.1 ptsMediumObservability
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+9.1 ptsMediumDR & Backup
Raise allocation-aware density on the hot paths — currently 32 use(s) across 165,382 production line(s) (~0.2/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.+4.2 ptsMediumAllocation hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.6 ptsLowADR Quality
Add a 'Testing' section to the root README — how to run the test suite.+1.6 ptsMediumDocumentation (README)

File quality

Per-file score 0–10 — a quality signature. Of 222 files carrying findings, judged against the Production bar: 0% slop · 59% mixed · 41% near-clean.

FileScoreBandWorst signal
REDACTED4.3MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift4.8MixedCyclomatic Complexity: RecordingRegionOverlayView.calculateResizedRect (cyclomatic 17)
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift5.5MixedCyclomatic Complexity: AnnotateQuickPropertiesBar.activePropertiesContent (cyclomatic 33)
Snapzy/Features/VideoEditor/VideoEditorState.swift5.5MixedCyclomatic Complexity: VideoEditorState.undo (cyclomatic 21)
Snapzy/Services/Capture/AreaSelectionWindow.swift5.5MixedCyclomatic Complexity: AreaSelectionController.startSelectionSession (cyclomatic 19)
Snapzy/Services/Capture/ScreenCaptureManager.swift5.5MixedCyclomatic Complexity: ScreenCaptureManager.scanTransparentFringeBounds (cyclomatic 17)
Snapzy/Features/Recording/RecordingCoordinator.swift5.5MixedGod Classes: ClassTooLong: RecordingCoordinator
Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift5.5MixedCognitive Complexity: AnnotateWindowController.performCloudReUploadCopyAndClose (cognitive 20)
Snapzy/Features/Annotate/Managers/AnnotateWindow.swift5.6MixedCyclomatic Complexity: AnnotateWindow.performKeyEquivalent (cyclomatic 37)
Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift5.6MixedCyclomatic Complexity: QuickAccessCardView.body (cyclomatic 26)
Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift5.6MixedGod Classes: ClassTooLong: VideoEditorWindowController
Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift5.6MixedCode Duplication: Duplicated block (38–39 lines × 2)
Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift5.7MixedCyclomatic Complexity: AnnotationFactory.createAnnotation (cyclomatic 27)
REDACTED5.7MixedSecret Scanning: Leaked secret: REDACTED
Snapzy/Features/History/Managers/HistoryFloatingPanel.swift5.9MixedCyclomatic Complexity: HistoryFloatingPanel.performKeyEquivalent (cyclomatic 17)
Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift5.9MixedGod Classes: FileTooLong: Managers/RecordingCameraOverlayWindow.swift
Snapzy/Features/Splash/SplashWindow.swift6.3MixedCyclomatic Complexity: SplashWindowController.showWindow (cyclomatic 17)

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 — 19

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 — 865

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 — 17

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 48

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

Watchdog 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. 35 of 38 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 38 dimensions across the health lenses
D1D2D3D4D6D9D10D12D13D14D15D17D19D20D21D28D29D31D34D35D36D37AX10AX9DM4DM5DM6M1M2M3M4P1P2P3P4P5P6PF2

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
  1. 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, 884 of 901 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0f474-32a6-74c4-a106-b52c7094a031.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • D5 Coupling — not measured this run — Watchdog 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.
  • D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (29 contributor(s) across 1276 commit(s) sampled, automation and bot accounts excluded). One of them holds 93% of the history; the other 28 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D22 Internal API Consistency — not measured this run — Watchdog 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D26 Project Cohesion — not measured this run — Watchdog 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm package, a Go module, a Cargo crate, a Python, Composer, Bundler, Mix, rebar3, sbt, SwiftPM or pub package) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
  • D30 Dependency Vulnerabilities — not measured this run — Watchdog 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. Osv: the scanner produced no output at all, so no dependency was actually scanned. 'osv-scanner' exited 128 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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. `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift`, `Snapzy/Features/Annotate/Components/AnnotateDropZoneView.swift`, `Snapzy/Features/Annotate/Components/AnnotateMockupCanvasView.swift`, `Snapzy/Features/Annotate/Components/AnnotateMockupControlsSection.swift`, `Snapzy/Features/Annotate/Components/AnnotateMockupMainView.swift`, … (+86 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.
  • D43 Malicious Dependencies — not measured this run — Watchdog 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. Osv: the scanner produced no output at all, so no dependency was actually scanned. 'osv-scanner' exited 128 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
  • D44 Platform End-of-Life — not measured this run — Watchdog 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX1 Captive dependencies — not measured this run — Watchdog 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 no container it models, or knows cannot hold a captive, was found in this repository's source, 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.
  • AX2 Stateful singletons — not measured this run — Watchdog 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 singletons in C#, Spring/JSR-330/CDI singletons in Java and Kotlin, and module state in Python request handlers only, and this repository's product is written in Swift, which was left unread, 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.
  • AX3 Project dependency cycles — not measured this run — Watchdog 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 is computed over which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt, RubyGems, Composer, Mix/rebar3 and pub builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX4 Dependency direction — not measured this run — Watchdog 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 is computed over the direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt, RubyGems, Composer, Mix/rebar3 and pub builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
  • AX8 Test isolation — not measured this run — Watchdog 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 is computed over which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt, RubyGems, Composer, Mix/rebar3 and pub builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog 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 — Watchdog 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 — Watchdog 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.
  • C4 Data Retention — not measured this run — Watchdog 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 retention 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 retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog 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 data-subject rights 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 data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog 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 finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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 — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • P10 Library API & versioning — not measured this run — Watchdog 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 NuGet packaging and C# public API, and npm, PyPI, crates.io, Maven/Gradle, Go module, RubyGems, Composer, SwiftPM, pub.dev and Hex package manifests only, and no .NET project and no package manifest of those ecosystems was found in this repository, 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.
  • PF3 Async & latency hygiene — not measured this run — Watchdog 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. Those languages colour their functions async, so blocking inside them is the same defect this card counts elsewhere, but their blocking vocabulary is not modelled yet. That is a gap in this analyzer's language reach — not a finding that the code is free of it.
  • S1 Web-Security Posture — not measured this run — Watchdog 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.
  • X1 Async correctness — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X12 Unreachable branch — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X13 Undrained process stream — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X14 Bypassable address classification — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X16 Unfloored truncation loop — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X19 Unrestored process-global state — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X2 Cancellation propagation — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X20 Mistyped argument guard — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X22 Contradicted release guard — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X25 Inert configuration knob — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog 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 source only, and no C# was loaded and no JavaScript/TypeScript was found in this repository, 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.
  • X3 Exception handling — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X4 Structured logging — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X5 Nullable reference types — not measured this run — Watchdog 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing 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.
  • X7 Silent fallback defaults — not measured this run — Watchdog 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. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust and Go), and its Swift source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • 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.
  • 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.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • 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").
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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.
  • 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.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • 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.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.8 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.8 / 10 · rule-coverage 100% · ceiling Prevented

82 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ScrollingCaptureCoordinator.startAutoScrolling at 47. A further 24 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 ShortcutConfig.keyCodeToString at 100 — they are counted neither in the figure above nor in this dimension's score. 11 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: Snapzy/Services/Configuration/SnapzyConfigurationShortcutCodec.swift (SnapzyConfigurationShortcutCodec.keyCode at 66), Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift (CaptureOverlayShortcutSettings.legacyKeyCode at 28), Snapzy/Services/Capture/KeystrokeMonitorService.swift (KeystrokeMonitorService.specialKeyName at 28), Snapzy/App/SnapzyDeepLinkHandler.swift (SnapzyDeepLinkHandler.handle at 26), Snapzy/App/AppStatusBarController.swift (AppStatusBarController.makeMenuItem at 24), and 6 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.

ScrollingCaptureCoordinator.startAutoScrolling (cyclomatic 47)Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:255
ScrollingCaptureCoordinator.refreshPreview (cyclomatic 46)Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:761
KeyboardShortcutManager.loadShortcuts (cyclomatic 41)Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1201
DrawingCanvasNSView.mouseUp (cyclomatic 40)Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1313
AnnotateWindow.performKeyEquivalent (cyclomatic 37)Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:175

+ 77 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 ScrollingCaptureCoordinator.startAutoScrolling (cyclomatic 47) finding(s) in Cyclomatic Complexity — start with ScrollingCaptureCoordinator.swift. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 ScrollingCaptureCoordinator.refreshPreview (cyclomatic 46) finding(s) in Cyclomatic Complexity — start with ScrollingCaptureCoordinator.swift. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 KeyboardShortcutManager.loadShortcuts (cyclomatic 41) finding(s) in Cyclomatic Complexity — start with KeyboardShortcutManager.swift. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.

D2 · Cognitive Complexity6.2 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.2 / 10 · rule-coverage 100% · ceiling Prevented

131 method(s) exceeded the cognitive complexity threshold of 15; the worst was ScrollingCaptureCoordinator.refreshPreview at 83.

ScrollingCaptureCoordinator.refreshPreview (cognitive 83)Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:761
DrawingCanvasNSView.mouseUp (cognitive 82)Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1313
ScrollingCaptureCoordinator.startAutoScrolling (cognitive 70)Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:255
DrawingCanvasNSView.mouseDragged (cognitive 49)Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1031
DrawingCanvasNSView.keyDown (cognitive 45)Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:515

+ 126 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 ScrollingCaptureCoordinator.refreshPreview (cognitive 83) finding(s) in Cognitive Complexity — start with ScrollingCaptureCoordinator.swift. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 DrawingCanvasNSView.mouseUp (cognitive 82) finding(s) in Cognitive Complexity — start with AnnotateCanvasDrawingView.swift. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 ScrollingCaptureCoordinator.startAutoScrolling (cognitive 70) finding(s) in Cognitive Complexity — start with ScrollingCaptureCoordinator.swift. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.

D3 · God Classes8.2 / 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.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Prevented

127 god class(es) detected.

FileTooLong: Annotate/AnnotateState.swift · ×37Snapzy/Features/Annotate/AnnotateState.swift
ClassTooLong: AnnotateState · ×33Snapzy/Features/Annotate/AnnotateState.swift:15
MethodTooLong: ShortcutsSettingsView.body · ×33Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:124
TooManyMethods: AnnotateState · ×24Snapzy/Features/Annotate/AnnotateState.swift:15

What to do

  1. Resolve the 37 FileTooLong finding(s) in God Classes — start with AnnotateState.swift, AreaSelectionWindow.swift, VideoEditorState.swift. — One of this dimension's main actionable groups (37 warning-level).
  2. Resolve the 33 ClassTooLong finding(s) in God Classes — start with AreaSelectionWindow.swift (2), AnnotateState.swift, CaptureViewModel.swift. — One of this dimension's main actionable groups (33 warning-level).
  3. Resolve the 33 MethodTooLong finding(s) in God Classes — start with CaptureViewModel.swift (5), PreferencesCloudSettingsView.swift (2), ScrollingCaptureCoordinator.swift (2). — One of this dimension's main actionable groups (33 warning-level).
  4. 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.

D4 · Code Duplication8.8 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 100% · ceiling Verified

344 duplicated block group(s) detected. A further 16 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (8 lines × 2) · ×27tools/localization/CatalogTool.swift:399
Duplicated block (5 lines × 2) · ×23tools/localization/CatalogTool.swift:350
Duplicated block (9 lines × 2) · ×21Snapzy/Features/Recording/RecordingSession.swift:288
Duplicated block (7 lines × 2) · ×20Snapzy/App/MenuBarCustomizationStore.swift:67
Duplicated block (12 lines × 2) · ×18Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:767

+ 106 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 27 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with S3CloudProvider.swift (3), REDACTED (2), SnapzyMockAnnotateWindow.swift (2). — One of this dimension's main actionable groups (27 warning-level).
  2. Resolve the 23 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ScreenCaptureManager.swift (2), SnapzyConfigurationShortcutsImporter.swift (2), KeyboardShortcutManager.swift (2). — One of this dimension's main actionable groups (23 warning-level).
  3. Resolve the 21 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with AXElementSnapshot.swift (2), RecordingSession.swift, PostCaptureActionHandler.swift. — One of this dimension's main actionable groups (21 warning-level).
  4. 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.

D6 · Cohesion (LCOM4)8.8 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 100% · ceiling Verified

18 of 181 classes have LCOM4 above 3.

Low cohesion: UpdaterManager (LCOM4 9) · ×18Snapzy/Services/Updates/UpdaterManager.swift:16

What to do

  1. Resolve the 18 Low cohesion finding(s) in Cohesion (LCOM4) — start with RecordingRegionOverlayWindow.swift (2), UpdaterManager.swift, SmartElementOverlayView.swift. — One of this dimension's main actionable groups (18 warning-level).
  2. 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.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1901 test methods: 1901 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.1 / 10Stronggated by 103 serious findings✓ 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.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Prevented

30 skipped, 73 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1901 tests.

No assertions: testThemeManager_preferredAppearanceMutation_publishesObjectWillChange · ×73SnapzyTests/Services/WindowSurfacePaletteTests.swift:71
Skipped test: testRenderLiquidGlassComparisonSnapshots · ×30SnapzyTests/Shared/LiquidGlassSnapshotRenderTests.swift:15

What to do

  1. Resolve the 73 No assertions finding(s) in Test Quality — start with AnnotationDragConstraintTests.swift (16), RecordingVideoCompatibilityLimiterTests.swift (12), RecordingSessionShortcutGatingTests.swift (5). — One of this dimension's main actionable groups (73 warning-level).
  2. Resolve the 30 Skipped test finding(s) in Test Quality — start with OCRRecognitionTests.swift (5), HistoryPanelPositionTests.swift (4), AreaSelectionSessionLifecycleTests.swift (3). — One of this dimension's main actionable groups (30 warning-level).
  3. 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.

D12 · Dependency Hygiene9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

4 outdated direct SwiftPM dependencies, 0 pinning defect(s). 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.

Outdated: grdb.swift · ×4

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 4 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 2 of them read from the licence file the repository carries at the revision Package.resolved pins, and 2 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 1 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.6 / 10Stronggated by 28 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift (23×40=920); Snapzy/Services/Capture/AreaSelectionWindow.swift (45×19=855); Snapzy/Features/Capture/CaptureViewModel.swift (26×24=624)

Hotspot: Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift · ×28Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1313

What to do

  1. Resolve the 28 Hotspot finding(s) in Churn × Complexity Hotspots — start with AnnotateCanvasDrawingView.swift, AreaSelectionWindow.swift, CaptureViewModel.swift. — One of this dimension's main actionable groups (28 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 146705 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

Snapzy's documentation is clear and complete for a software project. The root README (with an overview, cross-referenced roadmap, and links to the docs directory) gives the product purpose and directs readers to installation/usage via the repository-level docs. The dedicated docs directory provides a flow-first map, architecture/platform breakdowns, capture/recording editors, localization catalogs, test-fixtures, and build guides for every tier of the project (repository root README documents only its own directory). This repository is well documented: a README for each directory (development, history, liquid glass, localization, post-capture, preferences) gives an overview of what the directory does and how to use it. The architecture docs are comprehensive — `Liquid Glass Design System & Architecture` covers the dual-path Ruru composite model with four-layer breakdown plus design rules, while `POST-CAPTURE.md` and `RECORDING.md` describe post-capture routing and media pipelines in detail. All documents open with an overview paragraph (Development, Capture History, Liquid Glass) and are clipped mid-sentence; internal jargon is not present and the outline confirms every section exists. This project's documentation is comprehensive and well-structured. The READMEs cover release workflows (Snapzy Release Workflow), self-signed certificate setup (Self-Signed Certificate Setup), global shortcuts/URL scheme automation (Shortcuts & URL Scheme Automation), and updates/diagnostics (Updates, Diagnostics & Problem Reporting). Architecture/Docs markdown files describe the runtime map, feature docs, and a detailed Mermaid flowchart of the global shortcut mechanism. The visible content is complete for its scope: release workflow, self-signed cert setup, global shortcuts, Sparkle update pipeline, and architecture; no missing overview, installation, usage, contributing, or licence.

Documentation: no architecture or design documentation · ×2docs/DEVELOPMENT.md

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)7.1 / 10Adequategated by 12 critical findings✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 7.1 / 10 · rule-coverage 100% · ceiling Documented

12 finding(s): 0 critical, 12 high, 0 medium, 0 low. 10 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 22 file(s) — `Snapzy/Features/Capture/CaptureViewModel.swift` (line 773, line 1109, line 1110, …), `Snapzy/Features/History/Managers/HistoryFloatingManager.swift` (lines 576–578), `Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift` (line 974), `Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift` (line 1413), `Snapzy/Features/QuickAccess/QuickAccessManager.swift` (lines 34–485, lines 495–496, line 898, …), … (+17 more) — 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 3 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

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. No action in Static Analysis (SAST) — all 10 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (10 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.0 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 392 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Snapzy/Services/Capture/ActiveWindowResolver.swift. Counted over 392 of the 519 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.4 / 10Stronggated by 12 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: SnapzyConfigurationExporter.swift↔SnapzyConfigurationImporter.swift 100%; PreferencesShortcutsSettingsView.swift↔ShortcutOverlayModels.swift 92%; AnnotateAnnotationFactory.swift↔AnnotateAnnotationRenderer.swift 79%

Change coupling: SnapzyConfigurationExporter.swift ↔ SnapzyConfigurationImporter.swift · ×9Snapzy/Services/Configuration/SnapzyConfigurationExporter.swift
Change-coupling hub: ShortcutOverlayModels.swift → AppStatusBarController.swift, CaptureViewModel.swift, PreferencesShortcutsSettingsView.swift · ×3Snapzy/Features/Shortcuts/ShortcutOverlayModels.swift

What to do

  1. Resolve the 9 Change coupling finding(s) in Change Coupling — start with SnapzyConfigurationExporter.swift, AnnotateAnnotationFactory.swift, VideoEditorZoomPreviewOverlay.swift. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with ShortcutOverlayModels.swift, SnapzyConfigurationDefaultDocument.swift, AnnotateQuickPropertiesBar.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.

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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 — check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ 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.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

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.

DM6 · Domain ↔ infrastructure boundary5.8 / 10Adequate✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

  • `CloudUploadRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Snapzy/Services/Cloud/CloudUploadRecord.swift:12
  • `CaptureHistoryRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Snapzy/Services/History/CaptureHistoryRecord.swift:30

What to do

  • Keep the ORM/table mapping and web-framework types on a boundary adapter; leave the domain entity framework-free (map row↔domain through a repository).
M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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.

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

What to do

  • Consider OpenTelemetry tracing/metrics (swift-otel with swift-distributed-tracing) and a health-check endpoint (a /health route on your Vapor/Hummingbird router) for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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 53729 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.

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.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.

  • Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.

What to do

  • Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

PF2 · Allocation hygiene6.1 / 10Adequate✓ Tool-verified

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 32 use(s) across 165,382 production line(s) (~0.2/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.

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.

LensScoreRatingImpact
Code Health86%StrongSolid.
Architecture95%ExemplaryStrongest area.
Maturity72%StrongSolid.
Readiness49%Weak — gated by D13, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security77%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling82%StrongSolid.
Performance61%AdequateAcceptable, with room to improve.
Unscored — 1 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 — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.
  • C4 Data Retention — Not assessed: these retention 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 retention 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.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
Not included — 84 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 — 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
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • 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 — not assessed — interface segregation is computed over a type surface 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — cloudflare-r2 Pulling cloudflare-r2-bootstrap Pulling aws-s3 Pulling aws-s3 Error Get "https://registry-1.docker.io/v2/": Forbidden cloudflare-r2 Error context canceled cloudflare-r2-bootstrap Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: cloudflare-r2-bootstrap Pulling cloudflare-r2 Pulling aws-s3 Pulling aws-s3 Error Get "https://registry-1.docker.io/v2/": Forbidden cloudflare-r2-bootstrap Error Get "https://registry-1.docker.io/v2/": Forbidden cloudflare-r2 Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • 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.
  • D11 Test Reliability — Test source is present (.swift) and this repository's suite is reachable only from an Apple platform: it ships Snapzy.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not re-run. Not scored: nothing was exercised.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • 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. 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 — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 measured no build unit over this repository's .py, .rb, .swift source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D30 Dependency Vulnerabilities — Scanner failed to run — not a clean result
  • D32 Data Compliance (PII/GDPR) — 91 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • D43 Malicious Dependencies — Scanner failed to run — not a clean result
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — D5 reads a .NET project-reference graph only — this repository's production source is .py, .rb, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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: this repository's test suite is reachable only from an Apple platform — it ships Snapzy.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not run and no coverage was instrumented. Not scored. To have the real number read, 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.
  • 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
  • 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. 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
  • P10 Library API & versioning — 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 — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Python, 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.
  • PF3 Async & latency hygiene — Sync-over-async was not assessed: this repository's async code is written in Swift, whose blocking calls this check does not model yet. That is a gap in the analyzer's language reach, not a finding about your code.
  • 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.
  • X1 Async correctness — 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
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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 reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — 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
  • X3 Exception handling — 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
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, 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 — 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
  • X5 Nullable reference types — 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
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — 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.

Critical — 19 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D13 · Secret Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
DM6 · Domain ↔ infrastructure boundary · Domain fused to persistence infrastructure · ×2
  • Domain fused to persistence infrastructure: CloudUploadRecord Snapzy/Services/Cloud/CloudUploadRecord.swift:12 — `CloudUploadRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: CaptureHistoryRecord Snapzy/Services/History/CaptureHistoryRecord.swift:30 — `CaptureHistoryRecord` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
Serious — 865 finding(s)
D10 · Test Quality · No assertions · ×73
  • No assertions: testThemeManager_preferredAppearanceMutation_publishesObjectWillChange SnapzyTests/Services/WindowSurfacePaletteTests.swift:71 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testPrimaryAnnotationColorAppliesAcrossToolDefaults SnapzyTests/Features/Annotate/AnnotateCoreTests.swift:2409 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testPrimaryAnnotationColorPersistsAcrossAnnotateStateInstances SnapzyTests/Features/Annotate/AnnotateCoreTests.swift:2426 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testRectangleMakesPositiveDragSquare SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:9 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testRectanglePreservesNegativeQuadrant SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:15 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testRectangleVerticalDownUsesPositiveHorizontalDirection SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testOvalMakesSquareBounds SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testOvalHorizontalLeftUsesNegativeVerticalDirection SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:33 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testFilledRectangleMakesSquareBounds SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:39 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testZeroLengthRectangleDragRemainsAtStart SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:45 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testRectangleStopsAtRightBoundaryWithoutChangingAxisDirections SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:51 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testFilledRectangleStopsAtLeftBoundary SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:62 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testOvalStopsAtTopBoundary SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:73 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testOvalStopsAtBottomBoundary SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testZeroLengthLineDragRemainsAtStart SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:113 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testLineTrimsDiagonalAtRightBoundary SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:119 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testStraightArrowTrimsDiagonalAtTopBoundary SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:139 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testCurvedArrowDoesNotChange SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:151 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testShiftNotHeldDoesNotChangeEndPoint SnapzyTests/Features/Annotate/AnnotationDragConstraintTests.swift:163 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testHorizontalEdgesAreFlippedToBottomLeftOrigin SnapzyTests/Features/Annotate/CropContentAnalyzerTests.swift:71 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testRetinaPointMappingHalvesEdgePositions SnapzyTests/Features/Annotate/CropContentAnalyzerTests.swift:100 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testDownscaledAnalysisKeepsBorderPositions SnapzyTests/Features/Annotate/CropContentAnalyzerTests.swift:107 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testStartStopCleanupTimer_noCrash SnapzyTests/Features/Recording/RecordingAnnotationStateTests.swift:97 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testSetOnFirstVideoFrame_doesNotCrash SnapzyTests/Features/Recording/RecordingSessionTests.swift:57 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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: testConfigureExpectedVideoDimensions_doesNotCrash SnapzyTests/Features/Recording/RecordingSessionTests.swift:63 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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.
  • + 48 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×37
  • FileTooLong: Annotate/AnnotateState.swift Snapzy/Features/Annotate/AnnotateState.swift — FileTooLong — 3866 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: AnnotateState (16-5726). The bar is 500 significant lines; this is 3366 over it, 7.73× 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: Capture/AreaSelectionWindow.swift Snapzy/Services/Capture/AreaSelectionWindow.swift — FileTooLong — 2998 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2498 over it, 6.00× 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: VideoEditor/VideoEditorState.swift Snapzy/Features/VideoEditor/VideoEditorState.swift — FileTooLong — 2233 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: VideoEditorState (312-3466). The bar is 500 significant lines; this is 1733 over it, 4.47× 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: Capture/CaptureViewModel.swift Snapzy/Features/Capture/CaptureViewModel.swift — FileTooLong — 2051 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ScreenCaptureViewModel (39-2979). The bar is 500 significant lines; this is 1551 over it, 4.10× 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: Annotate/InlineAreaAnnotateWindow.swift Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift — FileTooLong — 2044 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1544 over it, 4.09× 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: Capture/ScreenCaptureManager.swift Snapzy/Services/Capture/ScreenCaptureManager.swift — FileTooLong — 1904 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ScreenCaptureManager (95-2720). The bar is 500 significant lines; this is 1404 over it, 3.81× 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: Components/AnnotateCanvasDrawingView.swift Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift — FileTooLong — 1643 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: DrawingCanvasNSView (245-2540). The bar is 500 significant lines; this is 1143 over it, 3.29× 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: ScrollingCapture/ScrollingCaptureCoordinator.swift Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift — FileTooLong — 1604 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ScrollingCaptureCoordinator (15-2105). The bar is 500 significant lines; this is 1104 over it, 3.21× 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: Capture/ScreenRecordingManager.swift Snapzy/Services/Capture/ScreenRecordingManager.swift — FileTooLong — 1581 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: ScreenRecordingManager (684-2257). The bar is 500 significant lines; this is 1081 over it, 3.16× 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: LiquidGlass/LiquidGlassPreview.swift Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift — FileTooLong — 1358 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: LiquidGlassPlaygroundView (416-1981). The bar is 500 significant lines; this is 858 over it, 2.72× 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: Shortcuts/KeyboardShortcutManager.swift Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift — FileTooLong — 1327 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: KeyboardShortcutManager (584-1899). The bar is 500 significant lines; this is 827 over it, 2.65× 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: ScrollingCapture/ScrollingCaptureStitcher.swift Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift — FileTooLong — 1321 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 821 over it, 2.64× 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: Components/AnnotateQuickPropertiesBar.swift Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift — FileTooLong — 1288 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 788 over it, 2.58× 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: Models/AnnotateAnnotationItem.swift Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift — FileTooLong — 1216 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 716 over it, 2.43× 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: Components/PreferencesShortcutsSettingsView.swift Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift — FileTooLong — 1078 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: ShortcutsSettingsView (12-1229). The bar is 500 significant lines; this is 578 over it, 2.16× 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: QuickAccess/QuickAccessManager.swift Snapzy/Features/QuickAccess/QuickAccessManager.swift — FileTooLong — 1075 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: QuickAccessManager (35-1671). The bar is 500 significant lines; this is 575 over it, 2.15× 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: Components/PreferencesCloudSettingsView.swift Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift — FileTooLong — 964 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 464 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: Recording/RecordingCoordinator.swift Snapzy/Features/Recording/RecordingCoordinator.swift — FileTooLong — 949 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: RecordingCoordinator (13-1445). The bar is 500 significant lines; this is 449 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: Managers/AnnotateWindowController.swift Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift — FileTooLong — 908 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: AnnotateWindowController (39-1469). The bar is 500 significant lines; this is 408 over it, 1.82× 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: App/AppStatusBarController.swift Snapzy/App/AppStatusBarController.swift — FileTooLong — 876 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AppStatusBarController (15-1303). The bar is 500 significant lines; this is 376 over it, 1.75× 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: Services/AnnotateExporter.swift Snapzy/Features/Annotate/Services/AnnotateExporter.swift — FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AnnotateExporter (16-1138). The bar is 500 significant lines; this is 362 over it, 1.72× 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: REDACTED REDACTED — FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: CloudManager (20-1063). The bar is 500 significant lines; this is 249 over it, 1.50× 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: Services/AnnotateBlurEffectRenderer.swift Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift — FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 245 over it, 1.49× 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: Components/PreferencesCloudUploadHistoryView.swift Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift — FileTooLong — 737 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 237 over it, 1.47× 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: Managers/RecordingRegionOverlayWindow.swift Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift — FileTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: RecordingRegionOverlayView (184-1086). The bar is 500 significant lines; this is 182 over it, 1.36× 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.
  • + 12 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×33
  • ClassTooLong: AnnotateState Snapzy/Features/Annotate/AnnotateState.swift:15 — ClassTooLong — 3759 significant lines (blank, comment-only and punctuation-only lines excluded), 227 methods. The bar is 400 significant lines; this is 3359 over it, 9.40× 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: ScreenCaptureViewModel Snapzy/Features/Capture/CaptureViewModel.swift:38 — ClassTooLong — 2033 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 1633 over it, 5.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: VideoEditorState Snapzy/Features/VideoEditor/VideoEditorState.swift:311 — ClassTooLong — 2028 significant lines (blank, comment-only and punctuation-only lines excluded), 126 methods. The bar is 400 significant lines; this is 1628 over it, 5.07× 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: ScreenCaptureManager Snapzy/Services/Capture/ScreenCaptureManager.swift:94 — ClassTooLong — 1831 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 1431 over it, 4.58× 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: ScrollingCaptureCoordinator Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:14 — ClassTooLong — 1566 significant lines (blank, comment-only and punctuation-only lines excluded), 82 methods. The bar is 400 significant lines; this is 1166 over it, 3.92× 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: DrawingCanvasNSView Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:245 — ClassTooLong — 1508 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 1108 over it, 3.77× 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: AreaSelectionController Snapzy/Services/Capture/AreaSelectionWindow.swift:56 — ClassTooLong — 1390 significant lines (blank, comment-only and punctuation-only lines excluded), 108 methods. The bar is 400 significant lines; this is 990 over it, 3.48× 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: AreaSelectionOverlayView Snapzy/Services/Capture/AreaSelectionWindow.swift:2732 — ClassTooLong — 1286 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods. The bar is 400 significant lines; this is 886 over it, 3.22× 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: ScreenRecordingManager Snapzy/Services/Capture/ScreenRecordingManager.swift:683 — ClassTooLong — 1101 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 701 over it, 2.75× 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: LiquidGlassPlaygroundView Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:416 — ClassTooLong — 1085 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 685 over it, 2.71× 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: QuickAccessManager Snapzy/Features/QuickAccess/QuickAccessManager.swift:34 — ClassTooLong — 1058 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 658 over it, 2.65× 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: ShortcutsSettingsView Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:12 — ClassTooLong — 936 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 536 over it, 2.34× 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: RecordingCoordinator Snapzy/Features/Recording/RecordingCoordinator.swift:12 — ClassTooLong — 932 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 532 over it, 2.33× 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: AnnotateWindowController Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:38 — ClassTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 487 over it, 2.22× 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: KeyboardShortcutManager Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:583 — ClassTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 487 over it, 2.22× 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: AppStatusBarController Snapzy/App/AppStatusBarController.swift:14 — ClassTooLong — 870 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 470 over it, 2.18× 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: AnnotateExporter Snapzy/Features/Annotate/Services/AnnotateExporter.swift:15 — ClassTooLong — 777 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 377 over it, 1.94× 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: CloudManager REDACTED:19 — ClassTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 341 over it, 1.85× 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: VideoEditorExporter Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:12 — ClassTooLong — 646 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 246 over it, 1.62× 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: CaptureSettingsView Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift:35 — ClassTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 222 over it, 1.56× 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: HistoryFloatingContentView Snapzy/Features/History/Components/HistoryFloatingContentView.swift:11 — ClassTooLong — 587 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 187 over it, 1.47× 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: RecordingRegionOverlayView Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:184 — ClassTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 181 over it, 1.45× 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: VideoEditorWindowController Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:29 — ClassTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 153 over it, 1.38× 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: OCRService Snapzy/Services/Media/OCRService.swift:31 — ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 99 over it, 1.25× 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: InlineAreaAnnotateSession Snapzy/Features/Annotate/InlineAreaAnnotateSession.swift:55 — ClassTooLong — 487 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 87 over it, 1.22× 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.
  • + 8 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×33
  • MethodTooLong: ShortcutsSettingsView.body Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:124 — MethodTooLong — body runs 507 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 407 over it, 5.07× 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: CaptureSettingsView.body Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift:117 — MethodTooLong — body runs 455 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 355 over it, 4.55× 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: CloudCredentialFormView.body Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:816 — MethodTooLong — body runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× 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: AnnotateQuickPropertiesBar.activePropertiesContent Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:178 — MethodTooLong — activePropertiesContent runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× 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: ScrollingCaptureCoordinator.refreshPreview Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:761 — MethodTooLong — refreshPreview runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 130 over it, 2.30× 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: ScreenRecordingManager.prepareRecording Snapzy/Services/Capture/ScreenRecordingManager.swift:790 — MethodTooLong — prepareRecording runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× 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: ScrollingCaptureStitcher.append Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:372 — MethodTooLong — append runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.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: VideoEditorExporter.exportWithZooms Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:206 — MethodTooLong — exportWithZooms runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× 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: AppStatusBarController.makeMenuItem Snapzy/App/AppStatusBarController.swift:511 — MethodTooLong — makeMenuItem runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× 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: ScreenCaptureViewModel.startFrozenAreaSelection Snapzy/Features/Capture/CaptureViewModel.swift:1037 — MethodTooLong — startFrozenAreaSelection runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× 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: ScreenCaptureViewModel.captureOCR Snapzy/Features/Capture/CaptureViewModel.swift:2366 — MethodTooLong — captureOCR runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× 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: AnnotateExporter.renderFlatFinalImage Snapzy/Features/Annotate/Services/AnnotateExporter.swift:403 — MethodTooLong — renderFlatFinalImage runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× 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: ScreenCaptureViewModel.captureObjectCutout Snapzy/Features/Capture/CaptureViewModel.swift:2696 — MethodTooLong — captureObjectCutout runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: AreaSelectionController.startSelectionSession Snapzy/Services/Capture/AreaSelectionWindow.swift:553 — MethodTooLong — startSelectionSession runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: InlineAreaPropertiesBar.body Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:1854 — MethodTooLong — body runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: ScrollingCaptureCoordinator.startAutoScrolling Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:255 — MethodTooLong — startAutoScrolling runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: ScreenCaptureViewModel.startAreaCapture Snapzy/Features/Capture/CaptureViewModel.swift:657 — MethodTooLong — startAreaCapture runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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: ScrollingCaptureAccuracyBenchmark.corpus scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:24 — MethodTooLong — corpus runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: ShortcutsView.body Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift:22 — MethodTooLong — body runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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: HistorySettingsView.body Snapzy/Features/Preferences/Components/PreferencesHistorySettingsView.swift:18 — MethodTooLong — body runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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: GIFConverter.convert Snapzy/Services/Media/GIFConverter.swift:41 — MethodTooLong — convert runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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: AdvancedSettingsView.body Snapzy/Features/Preferences/Components/PreferencesAdvancedSettingsView.swift:32 — MethodTooLong — body runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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: FrozenAreaCaptureSession.cropCompositeImage Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:228 — MethodTooLong — cropCompositeImage runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.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: ScreenCaptureManager.makePreparedAreaCaptureContext Snapzy/Services/Capture/ScreenCaptureManager.swift:1897 — MethodTooLong — makePreparedAreaCaptureContext runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.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: KeyboardShortcutManager.registerShortcuts Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1495 — MethodTooLong — registerShortcuts runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.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.
  • + 8 more in this group — see findings.md.
D10 · Test Quality · Skipped test · ×30
  • Skipped test: testRenderLiquidGlassComparisonSnapshots SnapzyTests/Shared/LiquidGlassSnapshotRenderTests.swift:15 — Skipped — throws XCTSkip
  • Skipped test: testToggleSwitchesGlassSurfaceRenderingLive SnapzyTests/Shared/LiquidGlassToggleRenderTests.swift:25 — Skipped — throws XCTSkip
  • Skipped test: testApplyBackgroundCutoutStartsProcessingOnSupportedOS SnapzyTests/Features/Annotate/AnnotateBackgroundRedactionTests.swift:160 — Skipped — throws XCTSkip
  • Skipped test: testAutoCropToContentVisionFallbackTightensAroundSoftSubject SnapzyTests/Features/Annotate/AnnotateCropTests.swift:416 — Skipped — throws XCTSkip
  • Skipped test: testTopCenterPositionsAtTopWithPadding SnapzyTests/Features/History/HistoryPanelPositionTests.swift:23 — Skipped — throws XCTSkip
  • Skipped test: testBottomCenterPositionsAtBottomWithPadding SnapzyTests/Features/History/HistoryPanelPositionTests.swift:35 — Skipped — throws XCTSkip
  • Skipped test: testCenterPositionsAtVerticalCenter SnapzyTests/Features/History/HistoryPanelPositionTests.swift:47 — Skipped — throws XCTSkip
  • Skipped test: testCalculateOriginIgnoresPaddingForCenterCase SnapzyTests/Features/History/HistoryPanelPositionTests.swift:59 — Skipped — throws XCTSkip
  • Skipped test: testRenderPermissionRowStates SnapzyTests/Features/Onboarding/PermissionRowSnapshotRenderTests.swift:15 — Skipped — throws XCTSkip
  • Skipped test: testPreferenceSwitchesActionBarBetweenNativeAndFallbackRendering SnapzyTests/Features/Onboarding/SnapzyOnboardingActionBarTests.swift:35 — Skipped — throws XCTSkip
  • Skipped test: testMicrophoneAudioCapturerStartStopRealMicrophoneIntegration SnapzyTests/Features/Recording/MicrophoneAudioCapturerTests.swift:74 — Skipped — throws XCTSkip
  • Skipped test: testScreenRect_flipsAxTopLeftToAppKitBottomLeft_onPrimaryDisplay SnapzyTests/Services/Capture/AXElementInspectorTests.swift:17 — Skipped — throws XCTSkip
  • Skipped test: testLivePassthroughDrag_pastThreshold_overHoveredWindow_stillStartsManualSelection SnapzyTests/Services/Capture/AreaSelectionLivePassthroughWindowDetectionTests.swift:36 — Skipped — throws XCTSkip
  • Skipped test: testLivePassthroughClick_onHoveredWindow_selectsIt SnapzyTests/Services/Capture/AreaSelectionLivePassthroughWindowDetectionTests.swift:85 — Skipped — throws XCTSkip
  • Skipped test: testHiddenWindowSession_restore_postsSyntheticMouseMovedEvent SnapzyTests/Services/Capture/AreaSelectionModelsTests.swift:79 — Skipped — throws XCTSkip
  • Skipped test: testIsPresenting_falseAfterCompletion SnapzyTests/Services/Capture/AreaSelectionModelsTests.swift:196 — Skipped — throws XCTSkip
  • Skipped test: testCompleteSelection_reentrantCancelInsideCompletion_firesOnce SnapzyTests/Services/Capture/AreaSelectionSessionLifecycleTests.swift:56 — Skipped — throws XCTSkip
  • Skipped test: testScreenParameterChange_midSession_keepsWindowsVisible SnapzyTests/Services/Capture/AreaSelectionSessionLifecycleTests.swift:151 — Skipped — throws XCTSkip
  • Skipped test: testRecreatePooledWindow_swapsPoolEntryAndPresentsReplacement SnapzyTests/Services/Capture/AreaSelectionSessionLifecycleTests.swift:200 — Skipped — throws XCTSkip
  • Skipped test: testQueryElement_dedupesIdenticalRect SnapzyTests/Services/Capture/SmartElementQueryServiceTests.swift:45 — Skipped — throws XCTSkip
  • Skipped test: testCancelPendingQueries_emitsNil_andResetsDedup SnapzyTests/Services/Capture/SmartElementQueryServiceTests.swift:69 — Skipped — throws XCTSkip
  • Skipped test: testDebounce_collapsesRapidUpdatesIntoOneQuery SnapzyTests/Services/Capture/SmartElementQueryServiceTests.swift:97 — Skipped — throws XCTSkip
  • Skipped test: testSuggestedConfigURLUsesAccountHomeDirectory SnapzyTests/Services/Configuration/SnapzyConfigurationPathsTests.swift:60 — Skipped — throws XCTSkip
  • Skipped test: testVietnameseOCR_preservesDiacriticsForShortIssuePhrase SnapzyTests/Services/Media/OCRRecognitionTests.swift:43 — Skipped — throws XCTSkip
  • Skipped test: testVietnameseOCR_preservesDiverseDiacriticsForCommonPhrases SnapzyTests/Services/Media/OCRRecognitionTests.swift:59 — Skipped — throws XCTSkip
  • + 5 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×28
  • Hotspot: Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1313 — Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in DrawingCanvasNSView.mouseUp at line 1313. 8 of those changes were fix/bug commits, 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.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: Snapzy/Services/Capture/AreaSelectionWindow.swift Snapzy/Services/Capture/AreaSelectionWindow.swift:553 — Snapzy/Services/Capture/AreaSelectionWindow.swift changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AreaSelectionController.startSelectionSession at line 553. 21 of those changes were fix/bug commits, and the other 24 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Capture/AreaSelectionWindow.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: Snapzy/Features/Capture/CaptureViewModel.swift Snapzy/Features/Capture/CaptureViewModel.swift:349 — Snapzy/Features/Capture/CaptureViewModel.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ScreenCaptureViewModel.shortcutTriggered at line 349. 8 of those changes were fix/bug commits, and the other 18 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Capture/CaptureViewModel.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: Snapzy/Features/Annotate/AnnotateState.swift Snapzy/Features/Annotate/AnnotateState.swift:3679 — Snapzy/Features/Annotate/AnnotateState.swift changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AnnotateState.updateAnnotationProperties at line 3679. 4 of those changes were fix/bug commits, and the other 17 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/AnnotateState.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: Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift:117 — Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in CaptureSettingsView.body at line 117. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.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: Snapzy/Services/Configuration/SnapzyConfigurationDefaultDocument.swift Snapzy/Services/Configuration/SnapzyConfigurationDefaultDocument.swift:273 — Snapzy/Services/Configuration/SnapzyConfigurationDefaultDocument.swift changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in SnapzyConfigurationDefaultDocument.globalShortcut at line 273. 1 of those changes was a fix/bug commit, and the other 14 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Configuration/SnapzyConfigurationDefaultDocument.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: Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:234 — Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in InlineAreaAnnotateRootView.body at line 234. 5 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/InlineAreaAnnotateWindow.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: Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:344 — Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SnapzyConfigurationImporter.collectQuickAccess at line 344. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Configuration/SnapzyConfigurationImporter.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: Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:178 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in AnnotateQuickPropertiesBar.activePropertiesContent at line 178. 1 of those changes was a fix/bug commit, and the other 7 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.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: Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1058 — Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ShortcutsSettingsView.handleGlobalShortcutChange at line 1058. 1 of those changes was a fix/bug commit, 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.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: Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:88 — Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AnnotateCanvasView.body at line 88. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Components/AnnotateCanvasView.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: Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1201 — Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in KeyboardShortcutManager.loadShortcuts at line 1201. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Shortcuts/KeyboardShortcutManager.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: Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:128 — Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AnnotationRenderer.drawCurrentStroke at line 128. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.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: Snapzy/App/AppStatusBarController.swift Snapzy/App/AppStatusBarController.swift:511 — Snapzy/App/AppStatusBarController.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in AppStatusBarController.makeMenuItem at line 511. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/App/AppStatusBarController.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: Snapzy/Services/Capture/ScreenRecordingManager.swift Snapzy/Services/Capture/ScreenRecordingManager.swift:790 — Snapzy/Services/Capture/ScreenRecordingManager.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ScreenRecordingManager.prepareRecording at line 790. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Capture/ScreenRecordingManager.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: Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift:46 — Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in QuickAccessCardView.body at line 46. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/QuickAccess/Components/QuickAccessCardView.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: Snapzy/Features/Annotate/Services/AnnotateExporter.swift Snapzy/Features/Annotate/Services/AnnotateExporter.swift:403 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AnnotateExporter.renderFlatFinalImage at line 403. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Services/AnnotateExporter.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: Snapzy/Services/Configuration/SnapzyConfigurationShortcutCodec.swift Snapzy/Services/Configuration/SnapzyConfigurationShortcutCodec.swift:57 — Snapzy/Services/Configuration/SnapzyConfigurationShortcutCodec.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in SnapzyConfigurationShortcutCodec.keyCode at line 57. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Configuration/SnapzyConfigurationShortcutCodec.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: Snapzy/App/SnapzyDeepLinkHandler.swift Snapzy/App/SnapzyDeepLinkHandler.swift:19 — Snapzy/App/SnapzyDeepLinkHandler.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SnapzyDeepLinkHandler.handle at line 19. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/App/SnapzyDeepLinkHandler.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: Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:53 — Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AnnotationFactory.createAnnotation at line 53. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.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: Snapzy/Services/Capture/AreaSelectionMagnifier.swift Snapzy/Services/Capture/AreaSelectionMagnifier.swift:340 — Snapzy/Services/Capture/AreaSelectionMagnifier.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AreaSelectionMagnifier.update at line 340. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Services/Capture/AreaSelectionMagnifier.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: Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:392 — Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AnnotateBottomBarView.annotateActionButtons at line 392. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Annotate/Components/AnnotateBottomBarView.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: Snapzy/Features/VideoEditor/VideoEditorState.swift Snapzy/Features/VideoEditor/VideoEditorState.swift:1941 — Snapzy/Features/VideoEditor/VideoEditorState.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in VideoEditorState.undo at line 1941. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/VideoEditor/VideoEditorState.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: Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:206 — Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in VideoEditorExporter.exportWithZooms at line 206. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/VideoEditor/Services/VideoEditorExporter.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: Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:816 — Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in CloudCredentialFormView.body at line 816. 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-06-30..2026-09-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-30 14:52:40 +00:00' --until='2026-09-28 14:52:40 +00:00' --full-history --no-merges -- Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.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.
  • + 3 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×27
  • Duplicated block (8 lines × 2) tools/localization/CatalogTool.swift:399 — tools/localization/CatalogTool.swift:399-406 | tools/localization/CatalogTool.swift:409-416 — 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 (8 lines × 2) Snapzy/Features/Annotate/AnnotateState.swift:776 — Snapzy/Features/Annotate/AnnotateState.swift:776-785 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:1016-1023 — 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 `Snapzy/Features/Annotate/AnnotateState.swift:776` 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 (8 lines × 2) Snapzy/Features/VideoEditor/VideoEditorState.swift:1512 — Snapzy/Features/VideoEditor/VideoEditorState.swift:1512-1519 | Snapzy/Features/VideoEditor/VideoEditorState.swift:1541-1548 — 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 `Snapzy/Features/VideoEditor/VideoEditorState.swift:1512` 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) REDACTED:474 — REDACTED:474-481 | REDACTED:982-989 — 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 `REDACTED:474` 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) REDACTED:492 — REDACTED:492-499 | REDACTED:1000-1007 — 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 `REDACTED:492` 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) Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:296 — Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:296-303 | Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:359-366 — 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 before the matched lines, `Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:357` calls `setValue` and `Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:295` 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 (8 lines × 2) Snapzy/Services/Cloud/S3CloudProvider.swift:327 — Snapzy/Services/Cloud/S3CloudProvider.swift:327-334 | Snapzy/Services/Cloud/S3CloudProvider.swift:361-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 `Snapzy/Services/Cloud/S3CloudProvider.swift:327` 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) Snapzy/Services/Cloud/S3CloudProvider.swift:400 — Snapzy/Services/Cloud/S3CloudProvider.swift:400-407 | Snapzy/Services/Cloud/S3MultipartUploader.swift:310-317 — 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 `Snapzy/Services/Cloud/S3CloudProvider.swift:400` 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) Snapzy/Services/Media/ForegroundCutoutService.swift:79 — Snapzy/Services/Media/ForegroundCutoutService.swift:79-86 | Snapzy/Services/Media/ForegroundCutoutService.swift:121-128 — 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 `Snapzy/Services/Media/ForegroundCutoutService.swift:79` 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 (8 lines × 2) Snapzy/Services/Media/OCRService.swift:581 — Snapzy/Services/Media/OCRService.swift:581-588 | Snapzy/Services/Media/QRCodeService.swift:91-98 — 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 `Snapzy/Services/Media/OCRService.swift:581` 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) Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:51 — Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:51-58 | Snapzy/Shared/Extensions/View+CornerRadius.swift:35-42 — before extracting anything, compare `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift` and `Snapzy/Shared/Extensions/View+CornerRadius.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.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.
  • Duplicated block (8 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:19 — Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:19-26 | Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:455-462 — 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:19` 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) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1256 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1256-1263 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:849-856 — 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 `Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1256` 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 (8 lines × 2) Snapzy/Features/Onboarding/Components/OnboardingVSDesignSystem.swift:169 — Snapzy/Features/Onboarding/Components/OnboardingVSDesignSystem.swift:169-176 | Snapzy/Features/Onboarding/Components/OnboardingVSDesignSystem.swift:205-212 — 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 `Snapzy/Features/Onboarding/Components/OnboardingVSDesignSystem.swift:169` 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:92 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:92-99 | Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:117-124 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `3` in one and `3.5` 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 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:120 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:120-127 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:198-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. Read the line range as the matched WINDOW rather than a finished unit: at `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:120` 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, `Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:196` calls `foregroundStyle` and `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:119` 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 (8 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessCard.swift:114 — Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessCard.swift:114-121 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessCard.swift:159-166 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessCard.swift:114` 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:295 — Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:295-302 | Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:307-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.
  • Duplicated block (8 lines × 2) Snapzy/Features/Preferences/Components/PreferencesAboutFeatureCard.swift:42 — Snapzy/Features/Preferences/Components/PreferencesAboutFeatureCard.swift:42-49 | Snapzy/Features/Preferences/Components/PreferencesAboutLinkCard.swift:42-49 — 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 `Snapzy/Features/Preferences/Components/PreferencesAboutFeatureCard.swift:42` 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, `Snapzy/Features/Preferences/Components/PreferencesAboutLinkCard.swift:51` calls `buttonStyle` and `Snapzy/Features/Preferences/Components/PreferencesAboutFeatureCard.swift:50` 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 (8 lines × 2) Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.swift:69 — Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.swift:69-76 | Snapzy/Features/Preferences/Components/PreferencesQuickAccessSwipeZoneView.swift:24-31 — 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 `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.swift:69` 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, `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.swift:77` calls `opacity`, `help` and `Snapzy/Features/Preferences/Components/PreferencesQuickAccessSwipeZoneView.swift:32` 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 (8 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:814 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:814-821 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:669-676 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:814` 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 (8 lines × 2) Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:352 — Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:352-359 | Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:387-394 — 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 (8 lines × 2) Snapzy/Services/Cloud/S3CloudProvider.swift:420 — Snapzy/Services/Cloud/S3CloudProvider.swift:420-427 | Snapzy/Services/Cloud/S3MultipartUploader.swift:346-353 — 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) Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:32 — Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:32-39 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:29-36 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 (8 lines × 2) Snapzy/Features/Recording/Components/RecordingToolbarCameraToggleButton.swift:126 — Snapzy/Features/Recording/Components/RecordingToolbarCameraToggleButton.swift:126-133 | Snapzy/Features/Recording/Components/RecordingToolbarMicToggleButton.swift:90-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.
  • + 2 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×24
  • TooManyMethods: AnnotateState Snapzy/Features/Annotate/AnnotateState.swift:15 — TooManyMethods — 227 methods. The bar is 30 methods; this is 197 over it, 7.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: VideoEditorState Snapzy/Features/VideoEditor/VideoEditorState.swift:311 — TooManyMethods — 126 methods. The bar is 30 methods; this is 96 over it, 4.20× 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: AreaSelectionController Snapzy/Services/Capture/AreaSelectionWindow.swift:56 — TooManyMethods — 108 methods. The bar is 30 methods; this is 78 over it, 3.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: AreaSelectionOverlayView Snapzy/Services/Capture/AreaSelectionWindow.swift:2732 — TooManyMethods — 89 methods. The bar is 30 methods; this is 59 over it, 2.97× 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: DrawingCanvasNSView Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:245 — TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× 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: ScrollingCaptureCoordinator Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:14 — TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× 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: ScreenCaptureManager Snapzy/Services/Capture/ScreenCaptureManager.swift:94 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: AppStatusBarController Snapzy/App/AppStatusBarController.swift:14 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× 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: QuickAccessManager Snapzy/Features/QuickAccess/QuickAccessManager.swift:34 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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: RecordingCoordinator Snapzy/Features/Recording/RecordingCoordinator.swift:12 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: AnnotateWindowController Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:38 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: ScreenCaptureViewModel Snapzy/Features/Capture/CaptureViewModel.swift:38 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: KeyboardShortcutManager Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:583 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: InlineAreaAnnotateSession Snapzy/Features/Annotate/InlineAreaAnnotateSession.swift:55 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: ScreenRecordingManager Snapzy/Services/Capture/ScreenRecordingManager.swift:683 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 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.
  • TooManyMethods: CloudManager REDACTED:19 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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: RecordingRegionOverlayView Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:184 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: View Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:879 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: AnnotateExporter Snapzy/Features/Annotate/Services/AnnotateExporter.swift:15 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: VideoEditorWindowController Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:29 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: ScrollingCaptureStitcher Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:73 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: OCRService Snapzy/Services/Media/OCRService.swift:31 — 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.
  • TooManyMethods: AnnotateShortcutManager Snapzy/Features/Annotate/Services/AnnotateShortcutManager.swift:23 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: SnapzyConfigurationService Snapzy/Services/Configuration/SnapzyConfigurationService.swift:10 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×23
  • Duplicated block (5 lines × 2) tools/localization/CatalogTool.swift:350 — tools/localization/CatalogTool.swift:350-354 | tools/localization/CatalogTool.swift:383-387 — 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 `tools/localization/CatalogTool.swift:350` 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 (5 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1291 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1291-1295 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2701-2705 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1291` 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) Snapzy/Services/Capture/ScreenCaptureManager.swift:1656 — Snapzy/Services/Capture/ScreenCaptureManager.swift:1656-1660 | Snapzy/Services/Capture/ScreenCaptureManager.swift:1671-1675 — 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 `Snapzy/Services/Capture/ScreenCaptureManager.swift:1656` 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 (5 lines × 2) Snapzy/Services/Capture/ScreenCaptureManager.swift:1986 — Snapzy/Services/Capture/ScreenCaptureManager.swift:1986-1990 | Snapzy/Services/Capture/ScreenRecordingManager.swift:1828-1833 — 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 `Snapzy/Services/Capture/ScreenCaptureManager.swift:1986` 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 (5 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:49 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:49-53 | Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:73-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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:49` 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:121 — Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:121-125 | Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:136-141 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `3` in one and `6` 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 (5 lines × 2) Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:53 — Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:53-57 | Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:207-211 — 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 `Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.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. 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) Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:162 — Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:162-166 | Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:283-287 — 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 `Snapzy/Services/Configuration/SnapzyConfigurationShortcutsImporter.swift:162` 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) Snapzy/Features/Annotate/AnnotateManager.swift:334 — Snapzy/Features/Annotate/AnnotateManager.swift:334-338 | Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:373-377 — 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) Snapzy/Services/Cloud/CloudUploadHistoryStore.swift:128 — Snapzy/Services/Cloud/CloudUploadHistoryStore.swift:128-132 | Snapzy/Services/History/CaptureHistoryStore.swift:665-669 — 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) Snapzy/Services/Configuration/SnapzyConfigurationService.swift:29 — Snapzy/Services/Configuration/SnapzyConfigurationService.swift:29-33 | Snapzy/Services/FileAccess/SandboxFileAccessManager.swift:29-33 — 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) Snapzy/Features/Onboarding/Components/OnboardingPermissionsView.swift:276 — Snapzy/Features/Onboarding/Components/OnboardingPermissionsView.swift:276-280 | Snapzy/Features/Preferences/Components/PreferencesPermissionsSettingsView.swift:266-270 — 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) Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:47 — Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:47-51 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassVibrancy.swift:24-34 — 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) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:542 — Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:542-546 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift:243-247 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:140 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:140-144 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:119-123 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 (5 lines × 2) Snapzy/Services/Capture/AreaSelectionMagnifier.swift:521 — Snapzy/Services/Capture/AreaSelectionMagnifier.swift:521-525 | Snapzy/Services/Capture/AreaSelectionMagnifier.swift:530-534 — 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 `Snapzy/Services/Capture/AreaSelectionMagnifier.swift:521` 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) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:126 — Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:126-130 | Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:141-145 — 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) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:180 — Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:180-184 | Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:388-392 — 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) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:687 — Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:687-691 | Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:719-723 — 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 `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:687` 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 (5 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:749 — Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:749-753 | Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:788-792 — 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) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1265 — Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1265-1269 | Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1295-1299 — 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 `Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1265` 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 (5 lines × 2) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:49 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:49-53 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:55-59 — 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) scripts/generate_dmg_background.py:328 — scripts/generate_dmg_background.py:328-332 | scripts/generate_dmg_background.py:337-341 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×21
  • Duplicated block (9 lines × 2) Snapzy/Features/Recording/RecordingSession.swift:288 — Snapzy/Features/Recording/RecordingSession.swift:288-296 | Snapzy/Features/Recording/RecordingSession.swift:332-340 — 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. 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 (9 lines × 2) Snapzy/Services/Capture/AXElementSnapshot.swift:119 — Snapzy/Services/Capture/AXElementSnapshot.swift:119-127 | Snapzy/Services/Capture/ActiveWindowResolver.swift:92-100 — 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) Snapzy/Services/Capture/AXElementSnapshot.swift:129 — Snapzy/Services/Capture/AXElementSnapshot.swift:129-137 | Snapzy/Services/Capture/ActiveWindowResolver.swift:102-110 — 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) Snapzy/Services/Capture/PostCaptureActionHandler.swift:266 — Snapzy/Services/Capture/PostCaptureActionHandler.swift:266-274 | Snapzy/Services/Capture/PostCaptureActionHandler.swift:330-338 — 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 `Snapzy/Services/Capture/PostCaptureActionHandler.swift:266` 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 (9 lines × 2) Snapzy/Services/Capture/ScreenRecordingManager.swift:1004 — Snapzy/Services/Capture/ScreenRecordingManager.swift:1004-1012 | Snapzy/Services/Capture/ScreenRecordingManager.swift:1023-1033 — 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 `Snapzy/Services/Capture/ScreenRecordingManager.swift:1004` 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, `Snapzy/Services/Capture/ScreenRecordingManager.swift:1035` calls `deletingPathExtension` and `Snapzy/Services/Capture/ScreenRecordingManager.swift:1014` 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 × 2) Snapzy/Services/Cloud/CloudKeychainStore.swift:254 — Snapzy/Services/Cloud/CloudKeychainStore.swift:254-262 | Snapzy/Services/Security/OCRKeychainStore.swift:134-142 — 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 `Snapzy/Services/Cloud/CloudKeychainStore.swift:254` 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) Snapzy/Services/Cloud/CloudUsageService.swift:470 — Snapzy/Services/Cloud/CloudUsageService.swift:470-478 | Snapzy/Services/Cloud/CloudUsageService.swift:506-514 — 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 `Snapzy/Services/Cloud/CloudUsageService.swift:470` 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 × 2) Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:319 — Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:319-327 | Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:411-419 — 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 before the matched lines, `Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:407` calls `Int64`, `progress`, `Double` and `Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:317` 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 × 2) Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:126 — Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:126-134 | Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:545-553 — 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 `Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:126` 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 (9 lines × 2) Snapzy/Services/Cloud/S3CloudProvider.swift:446 — Snapzy/Services/Cloud/S3CloudProvider.swift:446-454 | Snapzy/Services/Cloud/S3MultipartUploader.swift:372-380 — 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. 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 (9 lines × 2) Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:202 — Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:202-210 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:1057-1065 — 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 `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:202` 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 × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:246 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:246-254 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:110-118 — 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) Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:270 — Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:270-278 | Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:288-296 — 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, `Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:279` calls `add` and `Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:298` 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 × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:259 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:259-267 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:228-236 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:259` 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 × 2) Snapzy/Features/VideoEditor/Services/VideoEditorAutoFocusEngine.swift:308 — Snapzy/Features/VideoEditor/Services/VideoEditorAutoFocusEngine.swift:308-316 | Snapzy/Features/VideoEditor/Services/VideoEditorAutoFocusEngine.swift:354-362 — 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 `Snapzy/Features/VideoEditor/Services/VideoEditorAutoFocusEngine.swift:308` 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 (9 lines × 2) Snapzy/Services/Configuration/SnapzyConfigurationShortcutsExporter.swift:46 — Snapzy/Services/Configuration/SnapzyConfigurationShortcutsExporter.swift:46-54 | Snapzy/Services/Configuration/SnapzyConfigurationShortcutsExporter.swift:135-143 — 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 `Snapzy/Services/Configuration/SnapzyConfigurationShortcutsExporter.swift:46` 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 (9 lines × 2) Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:238 — Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:238-246 | Snapzy/Services/Capture/AreaSelectionWindow.swift:3036-3044 — 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 (9 lines × 2) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:69 — Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:69-77 | Snapzy/Features/VideoEditor/Managers/VideoEditorWindow.swift:26-34 — 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 (9 lines × 2) Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:16 — Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:16-24 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:149-157 — 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 (9 lines × 2) Snapzy/Features/VideoEditor/Models/VideoEditorSpeedSegment.swift:107 — Snapzy/Features/VideoEditor/Models/VideoEditorSpeedSegment.swift:107-115 | Snapzy/Features/VideoEditor/Models/VideoEditorZoomSegment.swift:150-158 — 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) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:528 — Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:528-536 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift:227-235 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×20
  • Duplicated block (7 lines × 2) Snapzy/App/MenuBarCustomizationStore.swift:67 — Snapzy/App/MenuBarCustomizationStore.swift:67-73 | Snapzy/Features/QuickAccess/Models/QuickAccessActionConfigurationStore.swift:82-88 — 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 (7 lines × 2) Snapzy/Features/Annotate/AnnotateState.swift:3146 — Snapzy/Features/Annotate/AnnotateState.swift:3146-3152 | Snapzy/Features/Annotate/AnnotateState.swift:3162-3168 — 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 `Snapzy/Features/Annotate/AnnotateState.swift:3146` 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 (7 lines × 2) Snapzy/Features/History/HistoryWindowController.swift:59 — Snapzy/Features/History/HistoryWindowController.swift:59-65 | Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:110-116 — before extracting anything, compare `Snapzy/Features/History/HistoryWindowController.swift` and `Snapzy/Features/History/Managers/HistoryFloatingPanel.swift` as WHOLE FILES: this scan already matched 3 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. 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 `Snapzy/Features/History/HistoryWindowController.swift:59` 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) Snapzy/Services/Capture/RecordingMetadata.swift:236 — Snapzy/Services/Capture/RecordingMetadata.swift:236-242 | Snapzy/Services/Capture/RecordingMetadata.swift:649-655 — 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 (7 lines × 2) Snapzy/Services/Capture/ScreenRecordingManager.swift:396 — Snapzy/Services/Capture/ScreenRecordingManager.swift:396-402 | Snapzy/Services/Capture/ScreenRecordingManager.swift:405-411 — 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 (7 lines × 2) Snapzy/Services/History/CaptureHistoryRetentionService.swift:67 — Snapzy/Services/History/CaptureHistoryRetentionService.swift:67-73 | Snapzy/Services/History/CaptureHistoryStore.swift:494-500 — 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) Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:98 — Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:98-108 | Snapzy/Features/Recording/Services/RecordingAnnotationFactory.swift:38-44 — 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 `Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:98` 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 (7 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:56 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:56-62 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:79-85 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:56` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:63` calls `play` and `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:86` 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 (7 lines × 2) Snapzy/Features/History/Components/HistoryCardView.swift:90 — Snapzy/Features/History/Components/HistoryCardView.swift:90-96 | Snapzy/Features/History/Components/HistoryItemView.swift:36-42 — 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 `Snapzy/Features/History/Components/HistoryCardView.swift:90` 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:178 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:178-184 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:78-84 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:178` 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 (7 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:15 — Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:15-21 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:47-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. Read the line range as the matched WINDOW rather than a finished unit: at `Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:15` 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) Snapzy/Features/Preferences/Components/PreferencesAboutSettingsView.swift:174 — Snapzy/Features/Preferences/Components/PreferencesAboutSettingsView.swift:174-180 | Snapzy/Features/Preferences/Components/PreferencesUpdateChannelSection.swift:21-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.
  • Duplicated block (7 lines × 2) Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:154 — Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:154-160 | Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:170-176 — 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 `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:154` 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, `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:177` calls `opacity`, `allowsHitTesting` and `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:161` 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 (7 lines × 2) Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:231 — Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:231-237 | Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:248-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 `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:231` 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 `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:255` calls `padding` and `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewCard.swift:238` 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 (7 lines × 2) Snapzy/Features/Capture/OCRLinkPromptManager.swift:144 — Snapzy/Features/Capture/OCRLinkPromptManager.swift:144-150 | Snapzy/Services/Diagnostics/AppToastManager.swift:396-402 — 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 (7 lines × 2) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:102 — Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:102-108 | Snapzy/Features/VideoEditor/Managers/VideoEditorWindow.swift:64-70 — 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 (7 lines × 2) Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:39 — Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:39-45 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassVibrancy.swift:16-22 — 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 (7 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:732 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:732-738 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:628-634 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 (7 lines × 2) Snapzy/Features/Annotate/Services/AnnotateMockupExporter.swift:82 — Snapzy/Features/Annotate/Services/AnnotateMockupExporter.swift:82-88 | Snapzy/Services/Clipboard/ClipboardHelper.swift:363-369 — 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 (7 lines × 2) Snapzy/Features/VideoEditor/Models/VideoEditorSpeedSegment.swift:98 — Snapzy/Features/VideoEditor/Models/VideoEditorSpeedSegment.swift:98-104 | Snapzy/Features/VideoEditor/Models/VideoEditorZoomSegment.swift:141-147 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×18
  • Duplicated block (12 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:767 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:767-778 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2177-2188 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:767` 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1257 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1257-1268 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2667-2678 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1257` 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) Snapzy/Services/Capture/AreaSelectionWindow.swift:4279 — Snapzy/Services/Capture/AreaSelectionWindow.swift:4279-4290 | Snapzy/Services/Capture/AreaSelectionWindow.swift:4479-4490 — 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 `Snapzy/Services/Capture/AreaSelectionWindow.swift:4279` 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, `Snapzy/Services/Capture/AreaSelectionWindow.swift:4278` calls `hideSizeIndicator` and `Snapzy/Services/Capture/AreaSelectionWindow.swift:4478` 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 lines × 2) Snapzy/Services/Capture/ScreenCaptureManager.swift:660 — Snapzy/Services/Capture/ScreenCaptureManager.swift:660-671 | Snapzy/Services/Capture/ScreenCaptureManager.swift:1171-1182 — 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 `Snapzy/Services/Capture/ScreenCaptureManager.swift:660` 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) Snapzy/Services/Cloud/CloudUsageService.swift:75 — Snapzy/Services/Cloud/CloudUsageService.swift:75-86 | Snapzy/Services/Cloud/CloudUsageService.swift:137-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 (12 lines × 2) Snapzy/Services/History/CaptureHistoryStore.swift:213 — Snapzy/Services/History/CaptureHistoryStore.swift:213-227 | Snapzy/Services/History/CaptureHistoryStore.swift:267-278 — 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 `Snapzy/Services/History/CaptureHistoryStore.swift:213` 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) Snapzy/Services/Shortcuts/ShortcutValidationService.swift:37 — Snapzy/Services/Shortcuts/ShortcutValidationService.swift:37-48 | Snapzy/Services/Shortcuts/ShortcutValidationService.swift:152-163 — 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 `Snapzy/Services/Shortcuts/ShortcutValidationService.swift:37` 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 (12 lines × 2) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:92 — Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:92-103 | Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift:103-114 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 89 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 `Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:92` 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1546 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1546-1557 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1741-1752 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1546` 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) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:579 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:579-590 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:257-268 — 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:579` 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) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:605 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:605-616 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:286-297 — 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:605` 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 `orientation` to `state.aspectRatioOrientation` in one and `aspectRatioOrientation` 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 (12 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:861 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:861-872 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:900-911 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:861` 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 (12 lines × 2) Snapzy/Features/Preferences/Components/PreferencesMenuBarSettingsView.swift:369 — Snapzy/Features/Preferences/Components/PreferencesMenuBarSettingsView.swift:369-380 | Snapzy/Features/Preferences/Components/PreferencesQuickAccessActionCustomizationView.swift:105-116 — 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 `Snapzy/Features/Preferences/Components/PreferencesMenuBarSettingsView.swift:369` 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 lines × 2) Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:191 — Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:191-202 | Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:237-248 — 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) Snapzy/Features/VideoEditor/Components/VideoEditorEmptyStateView.swift:150 — Snapzy/Features/VideoEditor/Components/VideoEditorEmptyStateView.swift:150-161 | Snapzy/Features/VideoEditor/Components/VideoEditorEmptyStateView.swift:188-199 — 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. 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 (12 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:153 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:153-164 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:134-147 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:153` 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 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1165 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1165-1176 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2506-2517 — 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 (12 lines × 2) Snapzy/Services/Capture/CaptureEventTapController.swift:169 — Snapzy/Services/Capture/CaptureEventTapController.swift:169-180 | Snapzy/Services/Capture/SmartElementQueryService.swift:125-136 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×18
  • Duplicated block (6 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1250 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1250-1255 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2660-2665 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1250` 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 (6 lines × 2) Snapzy/Features/Onboarding/SnapzyOnboardingState.swift:196 — Snapzy/Features/Onboarding/SnapzyOnboardingState.swift:196-201 | Snapzy/Features/Onboarding/SnapzyOnboardingState.swift:292-297 — 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 `Snapzy/Features/Onboarding/SnapzyOnboardingState.swift:196` 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 (6 lines × 2) Snapzy/Features/Recording/RecordingCoordinator.swift:589 — Snapzy/Features/Recording/RecordingCoordinator.swift:589-594 | Snapzy/Features/Recording/RecordingCoordinator.swift:725-730 — 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 `Snapzy/Features/Recording/RecordingCoordinator.swift:589` 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) Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:650 — Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:650-655 | Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:665-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 `Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:650` 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) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1249 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1249-1254 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:842-847 — 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 `Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1249` 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) Snapzy/Features/History/Components/HistoryCardView.swift:20 — Snapzy/Features/History/Components/HistoryCardView.swift:20-25 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:18-23 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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. 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 (6 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:492 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:492-497 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:454-459 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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. 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 (6 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:676 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:676-681 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:578-583 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:676` 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, `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:576` calls `offset` and `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:674` 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) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift:99 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift:99-104 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift:114-119 — 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 `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift:99` 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 (6 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:98 — Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:98-103 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:150-155 — 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) Snapzy/Features/Annotate/Services/AnnotationSessionStore.swift:231 — Snapzy/Features/Annotate/Services/AnnotationSessionStore.swift:231-236 | Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:428-436 — 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) Snapzy/Features/History/Components/HistoryFloatingContentView.swift:541 — Snapzy/Features/History/Components/HistoryFloatingContentView.swift:541-546 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:779-784 — 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockPrerecordToolbar.swift:141 — Snapzy/Features/Onboarding/Mockups/SnapzyMockPrerecordToolbar.swift:141-146 | Snapzy/Features/Onboarding/Mockups/SnapzyMockRecordingStatusBar.swift:124-129 — 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) Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:91 — Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:91-96 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:157-162 — 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) Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift:52 — Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift:52-57 | Snapzy/Features/Recording/Models/RecordingMicrophoneDevice.swift:45-50 — 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) Snapzy/Features/Annotate/InlineAreaMagnifierHostView.swift:159 — Snapzy/Features/Annotate/InlineAreaMagnifierHostView.swift:159-164 | Snapzy/Services/Capture/AreaSelectionWindow.swift:3869-3874 — 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 `Snapzy/Features/Annotate/InlineAreaMagnifierHostView.swift:159` 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 `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 (6 lines × 2) Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift:69 — Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift:69-74 | Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:155-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 `Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift:69` 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 (6 lines × 2) Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:174 — Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:174-179 | Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:307-312 — 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 `Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:174` 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×18
  • Low cohesion: UpdaterManager (LCOM4 9) Snapzy/Services/Updates/UpdaterManager.swift:16 — UpdaterManager'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: SmartElementOverlayView (LCOM4 7) Snapzy/Services/Capture/SmartElement/SmartElementOverlayView.swift:19 — SmartElementOverlayView's methods fall into 7 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 7 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: AreaSelectionOverlayView (LCOM4 6) Snapzy/Services/Capture/AreaSelectionWindow.swift:2732 — AreaSelectionOverlayView'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: AnnotateWindowController (LCOM4 6) Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:38 — AnnotateWindowController'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: RecordingRegionOverlayView (LCOM4 6) Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:184 — RecordingRegionOverlayView'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: VideoEditorWindowController (LCOM4 6) Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:29 — VideoEditorWindowController'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: VideoEditorState (LCOM4 5) Snapzy/Features/VideoEditor/VideoEditorState.swift:311 — VideoEditorState'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: DesktopIconManager (LCOM4 5) Snapzy/Services/Wallpaper/DesktopIconManager.swift:15 — DesktopIconManager'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: DragHandleNSView (LCOM4 5) Snapzy/Features/Annotate/Components/AnnotateDragHandleView.swift:38 — DragHandleNSView'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: RecordingCameraPreviewView (LCOM4 5) Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift:566 — RecordingCameraPreviewView'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: VideoEditorWindow (LCOM4 5) Snapzy/Features/VideoEditor/Managers/VideoEditorWindow.swift:18 — VideoEditorWindow'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: SplashWindow (LCOM4 4) Snapzy/Features/Splash/SplashWindow.swift:14 — SplashWindow'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: ScreenCaptureManager (LCOM4 4) Snapzy/Services/Capture/ScreenCaptureManager.swift:94 — ScreenCaptureManager'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: AppLanguageManager (LCOM4 4) Snapzy/Shared/Localization/AppLanguageManager.swift:33 — AppLanguageManager'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: UndoIsolatedTextView (LCOM4 4) Snapzy/Features/Annotate/Components/AnnotateTextEditOverlay.swift:293 — UndoIsolatedTextView'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: AnnotateWindow (LCOM4 4) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:62 — AnnotateWindow'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: HistoryFloatingPanel (LCOM4 4) Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:13 — HistoryFloatingPanel'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: RecordingRegionOverlayWindow (LCOM4 4) Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:62 — RecordingRegionOverlayWindow'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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×16
  • Duplicated block (10 lines × 2) Snapzy/Features/CrashReport/ZipArchiveWriter.swift:31 — Snapzy/Features/CrashReport/ZipArchiveWriter.swift:31-40 | Snapzy/Features/CrashReport/ZipArchiveWriter.swift:46-55 — 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, `Snapzy/Features/CrashReport/ZipArchiveWriter.swift:44` calls `appendUInt32LE` and `Snapzy/Features/CrashReport/ZipArchiveWriter.swift:56` 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 lines × 2) Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:61 — Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:61-70 | Snapzy/Shared/Extensions/View+CornerRadius.swift:45-54 — before extracting anything, compare `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift` and `Snapzy/Shared/Extensions/View+CornerRadius.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:61` 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 × 2) Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:73 — Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:73-82 | Snapzy/Shared/Extensions/View+CornerRadius.swift:57-66 — before extracting anything, compare `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift` and `Snapzy/Shared/Extensions/View+CornerRadius.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:73` 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 × 2) Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:85 — Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:85-94 | Snapzy/Shared/Extensions/View+CornerRadius.swift:69-78 — before extracting anything, compare `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift` and `Snapzy/Shared/Extensions/View+CornerRadius.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:85` 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 × 2) Snapzy/Features/Annotate/Components/AnnotateDragHandleView.swift:123 — Snapzy/Features/Annotate/Components/AnnotateDragHandleView.swift:123-132 | Snapzy/Features/QuickAccess/Components/QuickAccessPinDragHandleView.swift:130-139 — 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 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:800 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:800-809 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:181-190 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 121 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 (10 lines × 2) Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:161 — Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:161-170 | Snapzy/Features/Recording/Services/RecordingAnnotationFactory.swift:55-64 — 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 `Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.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 `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 (10 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:874 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:874-883 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:913-922 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:874` 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 (10 lines × 2) Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift:509 — Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift:509-518 | Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1366-1375 — 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 `Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift:509` 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) Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.swift:113 — Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.swift:113-122 | Snapzy/Features/Preferences/Components/PreferencesQuickAccessSwipeZoneView.swift:160-169 — 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 `Snapzy/Features/Preferences/Components/PreferencesQuickAccessPreviewSlotViews.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.
  • Duplicated block (10 lines × 2) Snapzy/Features/QuickAccess/Components/QuickAccessDraggableView.swift:537 — Snapzy/Features/QuickAccess/Components/QuickAccessDraggableView.swift:537-546 | Snapzy/Features/QuickAccess/Components/QuickAccessPinDragHandleView.swift:119-128 — 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 after the matched lines, `Snapzy/Features/QuickAccess/Components/QuickAccessPinDragHandleView.swift:130` calls `convert` and `Snapzy/Features/QuickAccess/Components/QuickAccessDraggableView.swift:548` 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 × 2) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:135 — Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:135-144 | Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:574-583 — 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1093 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1093-1102 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2434-2443 — 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 lines × 2) Snapzy/Features/Recording/RecordingCoordinator.swift:275 — Snapzy/Features/Recording/RecordingCoordinator.swift:275-284 | Snapzy/Services/Capture/AreaSelectionWindow.swift:1578-1587 — 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 lines × 2) Snapzy/Shared/Components/ShortcutRecorderView.swift:162 — Snapzy/Shared/Components/ShortcutRecorderView.swift:162-171 | Snapzy/Shared/Components/SingleKeyRecorderView.swift:161-170 — 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) Snapzy/Features/VideoEditor/Components/VideoEditorToolbarView.swift:27 — Snapzy/Features/VideoEditor/Components/VideoEditorToolbarView.swift:27-36 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoControlsView.swift:148-157 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×12
  • Duplicated block (11 lines × 2) Snapzy/Features/QuickAccess/QuickAccessManager.swift:1103 — Snapzy/Features/QuickAccess/QuickAccessManager.swift:1103-1113 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:1164-1175 — 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) Snapzy/Services/Clipboard/ClipboardHelper.swift:68 — Snapzy/Services/Clipboard/ClipboardHelper.swift:68-78 | Snapzy/Services/Clipboard/ClipboardHelper.swift:110-120 — 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. 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) Snapzy/Services/Cloud/CloudUploadHistoryStore.swift:134 — Snapzy/Services/Cloud/CloudUploadHistoryStore.swift:134-144 | Snapzy/Services/History/CaptureHistoryStore.swift:671-681 — 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 `Snapzy/Services/Cloud/CloudUploadHistoryStore.swift:134` 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockPrerecordToolbar.swift:111 — Snapzy/Features/Onboarding/Mockups/SnapzyMockPrerecordToolbar.swift:111-121 | Snapzy/Features/Onboarding/Mockups/SnapzyMockRecordingStatusBar.swift:98-108 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockPrerecordToolbar.swift:111` 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) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:890 — Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:890-900 | Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:974-984 — 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 `Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:890` 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) Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift:68 — Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift:68-78 | Snapzy/Features/Recording/Models/RecordingMicrophoneDevice.swift:61-71 — 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 `Snapzy/Features/Recording/Managers/RecordingCameraOverlayWindow.swift:68` 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) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:543 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:543-553 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:514-524 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:543` 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 `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 (11 lines × 2) Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:297 — Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:297-307 | Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:353-363 — 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 `Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:297` 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 (11 lines × 2) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:515 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:515-525 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:825-835 — 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 `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:515` 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) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift:183 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift:183-193 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift:213-223 — 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 `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift:183` 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 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1021 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1021-1031 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2556-2566 — 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 (11 lines × 2) Snapzy/Services/Cloud/S3CloudProvider.swift:429 — Snapzy/Services/Cloud/S3CloudProvider.swift:429-439 | Snapzy/Services/Cloud/S3MultipartUploader.swift:355-365 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×11
  • Duplicated block (13 lines × 2) Snapzy/App/SnapzyApp.swift:229 — Snapzy/App/SnapzyApp.swift:229-241 | Snapzy/App/SnapzyApp.swift:345-357 — 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 `Snapzy/App/SnapzyApp.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `note` to `String? = nil` in one and `String?` 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) Snapzy/Features/Annotate/AnnotateState.swift:135 — Snapzy/Features/Annotate/AnnotateState.swift:135-147 | Snapzy/Features/Annotate/Models/PersistedAnnotationSessionConversion.swift:76-88 — 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 `Snapzy/Features/Annotate/AnnotateState.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 (13 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1270 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1270-1282 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2680-2692 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1270` 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) Snapzy/Features/Capture/CaptureViewModel.swift:247 — Snapzy/Features/Capture/CaptureViewModel.swift:247-259 | Snapzy/Services/Capture/AreaSelectionWindow.swift:1504-1516 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:247` 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) Snapzy/Features/QuickAccess/Models/QuickAccessItem.swift:138 — Snapzy/Features/QuickAccess/Models/QuickAccessItem.swift:138-150 | Snapzy/Services/History/CaptureHistoryRecord.swift:54-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. 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) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1687 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1687-1699 | Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:260-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. 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:265 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:265-277 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:127-139 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:265` 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, `Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:264` calls `lineLimit` and `Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:126` 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) Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:425 — Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:425-437 | Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:530-542 — 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 `Snapzy/Features/VideoEditor/Managers/VideoEditorWindowController.swift:425` 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1189 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1189-1201 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2599-2611 — 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) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:296 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:296-308 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:256-269 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:931 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:931-943 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2341-2353 — 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 · Duplicated block (15 lines × 2) · ×10
  • Duplicated block (15 lines × 2) Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:486 — Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:486-500 | Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:528-542 — 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 `Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:486` 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 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 (15 lines × 2) REDACTED:68 — REDACTED:68-84 | REDACTED:156-170 — 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 `REDACTED:68` 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 × 2) Snapzy/Services/Cloud/CloudKeychainStore.swift:392 — Snapzy/Services/Cloud/CloudKeychainStore.swift:392-406 | REDACTED:1048-1062 — 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. 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 (15 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1446 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1446-1460 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1654-1668 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1446` 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 × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1573 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1573-1587 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1600-1614 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1573` 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 × 2) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1704 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1704-1718 | Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:277-291 — 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 (15 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:774 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:774-788 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:817-831 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:774` 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 (15 lines × 2) Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:147 — Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:147-161 | Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:173-187 — 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 `Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:147` 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. 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 (15 lines × 2) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1093 — Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1093-1107 | Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1143-1157 — 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 `Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1093` 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 × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1033 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1033-1047 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2568-2582 — 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.
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: SnapzyConfigurationExporter.swift ↔ SnapzyConfigurationImporter.swift Snapzy/Services/Configuration/SnapzyConfigurationExporter.swift — `Snapzy/Services/Configuration/SnapzyConfigurationExporter.swift` and `Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift` change together 100% of the time (13 of the 13 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 13 shared commits counted here, the most recent 3 are `76d09cb5` feat: Added a maximum recording resolution to improve H.264 browser c…; `1862794d` feat: Add Sound Effects Toggle to Quick Access (#586); `68e3d638` feat: enlarge screenshot magnifier and add pixel grid, crosshair, col… — run `git show` on any of them.
  • Change coupling: AnnotateAnnotationFactory.swift ↔ AnnotateAnnotationRenderer.swift Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift — `Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift` and `Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift` change together 79% of the time (11 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 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 `938f46b7` feat: add text snapping for highlighter in annotate editor (#410); `b299badd` feat: Add double-sided arrow in the mark-up (#368); `ff259de1` feat: Introduce arrow types and integrate into annotation features (#… — run `git show` on any of them.
  • Change coupling: VideoEditorZoomPreviewOverlay.swift ↔ VideoEditorZoomCompositor.swift Snapzy/Features/VideoEditor/Components/VideoEditorZoomPreviewOverlay.swift — `Snapzy/Features/VideoEditor/Components/VideoEditorZoomPreviewOverlay.swift` and `Snapzy/Features/VideoEditor/Services/VideoEditorZoomCompositor.swift` change together 62% of the time (8 of the 13 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 `c4247083` refactor: Refactor and rename video editor components for clarity; `f71b0b8a` refactor: Enhance video export settings and aspect ratio handling in …; `db3f9072` feat: Add zoom transition duration configuration and improve zoom tra… — run `git show` on any of them.
  • Change coupling: PreferencesQuickAccessSettingsView.swift ↔ QuickAccessCardView.swift Snapzy/Features/Preferences/Components/PreferencesQuickAccessSettingsView.swift — `Snapzy/Features/Preferences/Components/PreferencesQuickAccessSettingsView.swift` and `Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift` change together 60% of the time (9 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 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 `1862794d` feat: Add Sound Effects Toggle to Quick Access (#586); `a45b2ce4` feat: Add quick access settings for hiding cards when windows are ope…; `72e645b3` feat: Implement swipe actions for Quick Access cards with customizabl… — run `git show` on any of them.
  • Change coupling: PreferencesKeys.swift ↔ L10n.swift Snapzy/Features/Preferences/Models/PreferencesKeys.swift — `Snapzy/Features/Preferences/Models/PreferencesKeys.swift` and `Snapzy/Shared/Localization/L10n.swift` change together 57% of the time (39 of the 69 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 39 shared commits counted here, the most recent 3 are `76d09cb5` feat: Added a maximum recording resolution to improve H.264 browser c…; `1862794d` feat: Add Sound Effects Toggle to Quick Access (#586); `41222250` feat: Added camera overlay to screen recordings (#560) — run `git show` on any of them.
  • Change coupling: RecordingCoordinator.swift ↔ RecordingToolbarView.swift Snapzy/Features/Recording/RecordingCoordinator.swift — `Snapzy/Features/Recording/RecordingCoordinator.swift` and `Snapzy/Features/Recording/RecordingToolbarView.swift` change together 55% of the time (6 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 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 `41222250` feat: Added camera overlay to screen recordings (#560); `d332f1a4` feat: Implement recording output mode selection (video/GIF) in the to…; `ea606bc6` feat: Add screenshot capture functionality to recording toolbar — run `git show` on any of them.
  • Change coupling: VideoEditorVideoControlsView.swift ↔ VideoEditorExporter.swift Snapzy/Features/VideoEditor/Components/VideoEditorVideoControlsView.swift — `Snapzy/Features/VideoEditor/Components/VideoEditorVideoControlsView.swift` and `Snapzy/Features/VideoEditor/Services/VideoEditorExporter.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 `b242b50f` feat: Add speed segment functionality to Video Editor (#316); `f71b0b8a` refactor: Enhance video export settings and aspect ratio handling in …; `556bf830` feat: Implement auto-focus functionality with mouse tracking (#1) — run `git show` on any of them.
  • Change coupling: QuickAccessCardView.swift ↔ QuickAccessPanelController.swift Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift — `Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift` and `Snapzy/Features/QuickAccess/Managers/QuickAccessPanelController.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 `a45b2ce4` feat: Add quick access settings for hiding cards when windows are ope…; `6b037585` feat: Improve QuickAccess animations and card dismissal logic for smo… (at that commit the files were still `Snapzy/Features/QuickAccess/QuickAccessCardView.swift` and `Snapzy/Features/QuickAccess/QuickAccessPanelController.swift`); `94eadfa1` feat: Implement QuickAccess animations, progress indicators, and soun… (at that commit the files were still `ClaudeShot/Features/QuickAccess/QuickAccessCardView.swift` and `ClaudeShot/Features/QuickAccess/QuickAccessPanelController.swift`) — run `git show` on any of them.
  • Change coupling: VideoEditorLeftSidebar.swift ↔ VideoEditorZoomPreviewOverlay.swift Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift — `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomPreviewOverlay.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 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 5 shared commits counted here, the most recent 3 are `7de8dc5b` refactor: Refactor video editor state management and enhance playback… (at that commit the file was still `Snapzy/Features/VideoEditor/Components/VideoEditorRightSidebar.swift`); `db3f9072` feat: Add zoom transition duration configuration and improve zoom tra… (at that commit the file was still `Snapzy/Features/VideoEditor/Components/VideoEditorRightSidebar.swift`); `556bf830` feat: Implement auto-focus functionality with mouse tracking (#1) (at that commit the file was still `Snapzy/Features/VideoEditor/Components/VideoEditorRightSidebar.swift`) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×9
  • Duplicated block (14 lines × 2) Snapzy/Features/Annotate/AnnotateManager.swift:238 — Snapzy/Features/Annotate/AnnotateManager.swift:238-251 | Snapzy/Features/Annotate/AnnotateManager.swift:263-276 — 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 before the matched lines, `Snapzy/Features/Annotate/AnnotateManager.swift:235` calls `log` and `Snapzy/Features/Annotate/AnnotateManager.swift:261` 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 × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:853 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:853-866 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2263-2276 — 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 (14 lines × 2) Snapzy/Services/Capture/ScreenCaptureManager.swift:556 — Snapzy/Services/Capture/ScreenCaptureManager.swift:556-569 | Snapzy/Services/Capture/ScreenCaptureManager.swift:1099-1112 — 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 `Snapzy/Services/Capture/ScreenCaptureManager.swift:556` 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 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 (14 lines × 2) Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:282 — Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:282-295 | Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:343-356 — 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) Snapzy/Services/History/CaptureHistoryStore.swift:164 — Snapzy/Services/History/CaptureHistoryStore.swift:164-177 | Snapzy/Services/History/CaptureHistoryStore.swift:216-229 — 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 `Snapzy/Services/History/CaptureHistoryStore.swift:164` 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, `Snapzy/Services/History/CaptureHistoryStore.swift:178` calls `refreshRecords` and `Snapzy/Services/History/CaptureHistoryStore.swift:230` 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 lines × 2) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2207 — Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2207-2220 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:374-387 — 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 `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2207` 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1680 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1680-1693 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1784-1797 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1680` 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 × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:82 — Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:82-95 | Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:157-170 — 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) Snapzy/Features/History/Components/HistoryFloatingContentView.swift:666 — Snapzy/Features/History/Components/HistoryFloatingContentView.swift:666-679 | Snapzy/Features/History/Components/HistoryToolbar.swift:106-119 — 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 `Snapzy/Features/History/Components/HistoryFloatingContentView.swift:666` 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×8
  • Duplicated block (16 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:986 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:986-1001 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2521-2536 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:986` 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 × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1226 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1226-1241 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2636-2651 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1226` 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) Snapzy/Features/Recording/RecordingCoordinator.swift:114 — Snapzy/Features/Recording/RecordingCoordinator.swift:114-129 | Snapzy/Services/Capture/ScreenshotLastAreaStore.swift:32-47 — 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 `Snapzy/Features/Recording/RecordingCoordinator.swift:114` 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 (16 lines × 2) Snapzy/Features/Recording/RecordingCoordinator.swift:808 — Snapzy/Features/Recording/RecordingCoordinator.swift:808-823 | Snapzy/Features/Recording/RecordingCoordinator.swift:950-965 — 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 `Snapzy/Features/Recording/RecordingCoordinator.swift:808` 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, `Snapzy/Features/Recording/RecordingCoordinator.swift:949` calls `log` and `Snapzy/Features/Recording/RecordingCoordinator.swift:806` 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) Snapzy/Services/Media/OCRService.swift:148 — Snapzy/Services/Media/OCRService.swift:148-163 | Snapzy/Services/Media/OCRService.swift:186-201 — 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 `Snapzy/Services/Media/OCRService.swift:148` 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) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:732 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:732-747 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:113-128 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 121 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:732` 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 lines × 2) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:273 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:273-288 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:423-438 — 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 `Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:273` 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 (16 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:308 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:308-323 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:64-79 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:308` 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 `spacing` to `8` in one and `10` 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.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×7
  • Duplicated block (17 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1208 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1208-1224 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2618-2634 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1208` 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) Snapzy/Features/Capture/CaptureViewModel.swift:1098 — Snapzy/Features/Capture/CaptureViewModel.swift:1098-1114 | Snapzy/Features/Capture/CaptureViewModel.swift:1320-1336 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:1098` 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) Snapzy/Features/Capture/CaptureViewModel.swift:1511 — Snapzy/Features/Capture/CaptureViewModel.swift:1511-1527 | Snapzy/Features/Capture/CaptureViewModel.swift:1586-1602 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:1511` 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 (17 lines × 2) Snapzy/Features/History/HistoryWindowController.swift:41 — Snapzy/Features/History/HistoryWindowController.swift:41-57 | Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:92-108 — before extracting anything, compare `Snapzy/Features/History/HistoryWindowController.swift` and `Snapzy/Features/History/Managers/HistoryFloatingPanel.swift` as WHOLE FILES: this scan already matched 3 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. 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 `Snapzy/Features/History/HistoryWindowController.swift:41` 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 (17 lines × 2) Snapzy/Services/Capture/ScreenCaptureManager.swift:2453 — Snapzy/Services/Capture/ScreenCaptureManager.swift:2453-2469 | Snapzy/Services/Capture/ScreenRecordingManager.swift:1851-1867 — 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 (17 lines × 2) scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:26 — scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:26-42 | scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:47-63 — 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 `scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:26` 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 × 2) Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:71 — Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:71-87 | Snapzy/Features/Preferences/Components/PreferencesCloudCredentialImportSheet.swift:53-69 — 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 `Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:71` 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×6
  • Duplicated block (20 lines × 2) Snapzy/App/MenuBarIconRenderer.swift:52 — Snapzy/App/MenuBarIconRenderer.swift:52-71 | Snapzy/App/MenuBarIconRenderer.swift:115-134 — 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 `Snapzy/App/MenuBarIconRenderer.swift:52` 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 `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 (20 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1132 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1132-1151 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2473-2492 — 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1297 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1297-1316 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2707-2726 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1297` 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 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:2397 — Snapzy/Features/Capture/CaptureViewModel.swift:2397-2416 | Snapzy/Features/Capture/CaptureViewModel.swift:2750-2769 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:2397` 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 lines × 2) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1679 — Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1679-1698 | Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1723-1742 — 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 `Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1679` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1674` calls `shouldRegisterNow` and `Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1720` 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 (20 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:203 — Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:203-222 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:254-273 — 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×6
  • Duplicated block (18 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:1985 — Snapzy/Features/Capture/CaptureViewModel.swift:1985-2002 | Snapzy/Features/Capture/CaptureViewModel.swift:2707-2724 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:1985` 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, `Snapzy/Features/Capture/CaptureViewModel.swift:2706` calls `play` and `Snapzy/Features/Capture/CaptureViewModel.swift:1985` 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) Snapzy/Services/Capture/ScreenRecordingManager.swift:1208 — Snapzy/Services/Capture/ScreenRecordingManager.swift:1208-1225 | Snapzy/Services/Capture/ScreenRecordingManager.swift:1235-1252 — 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 `Snapzy/Services/Capture/ScreenRecordingManager.swift:1208` 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 lines × 2) REDACTED:845 — REDACTED:845-862 | REDACTED:915-932 — 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 `REDACTED:845` 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) Snapzy/Features/Annotate/Models/AnnotateAnnotationToolType.swift:51 — Snapzy/Features/Annotate/Models/AnnotateAnnotationToolType.swift:51-68 | Snapzy/Features/Annotate/Models/AnnotateAnnotationToolType.swift:72-89 — 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 (18 lines × 2) Snapzy/Features/History/Components/HistoryCardView.swift:97 — Snapzy/Features/History/Components/HistoryCardView.swift:97-114 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:105-122 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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 `Snapzy/Features/History/Components/HistoryCardView.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) Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:357 — Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:357-374 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:380-397 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:357` 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×6
  • Duplicated block (5 lines × 3) Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:385 — Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:385-391 | Snapzy/Services/Capture/ScreenCaptureManager.swift:2454-2458 | Snapzy/Services/Capture/ScreenRecordingManager.swift:1852-1856 — 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 `Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:385` 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 (5 lines × 3) Snapzy/Services/Clipboard/ClipboardHelper.swift:71 — Snapzy/Services/Clipboard/ClipboardHelper.swift:71-75 | Snapzy/Services/Clipboard/ClipboardHelper.swift:113-117 | Snapzy/Services/Clipboard/ClipboardHelper.swift:164-168 — 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. 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 × 3) Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:59 — Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:59-63 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:89-93 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:123-127 — 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 `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:59` 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 (5 lines × 3) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:38 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:38-42 | Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:202-206 | Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:56-60 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:38` 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, `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:37` calls `background`, `Color` and `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:201` 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockDesktopCanvas.swift:36 — Snapzy/Features/Onboarding/Mockups/SnapzyMockDesktopCanvas.swift:36-40 | Snapzy/Features/Onboarding/Mockups/SnapzyMockDesktopCanvas.swift:45-49 | Snapzy/Features/Onboarding/Mockups/SnapzyMockDesktopCanvas.swift:54-58 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockDesktopCanvas.swift:36` 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 × 3) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:173 — Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:173-177 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:105-109 | Snapzy/Services/Capture/SmartElement/SmartElementOverlayWindow.swift:67-71 — 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Snapzy/Features/Capture/CaptureViewModel.swift:657 — Snapzy/Features/Capture/CaptureViewModel.swift:657-836 | Snapzy/Features/Capture/CaptureViewModel.swift:838-972 | Snapzy/Features/Capture/CaptureViewModel.swift:1979-2062 | Snapzy/Features/Capture/CaptureViewModel.swift:2696-2899 — 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) Snapzy/Features/History/Managers/HistoryFloatingPanelController.swift:235 — Snapzy/Features/History/Managers/HistoryFloatingPanelController.swift:235-262 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:36-70 | Snapzy/Features/Recording/Components/RecordingAnnotationToolbarContentBuilder.swift:28-62 | Snapzy/Features/Recording/RecordingToolbarWindow.swift:506-544 — 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) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1441 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1441-1460 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1568-1587 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1595-1614 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1649-1668 — 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) Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:183 — Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:183-212 | Snapzy/Features/Onboarding/Components/OnboardingDiagnosticsOptInView.swift:17-91 | Snapzy/Features/Onboarding/Components/OnboardingSkipConfirmationView.swift:14-73 | Snapzy/Features/Onboarding/Components/OnboardingSponsorView.swift:16-90 — 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:32 — Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:32-54 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:15-104 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:23-43 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:199-232 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) Snapzy/Services/Cloud/S3CloudProvider.swift:148 — Snapzy/Services/Cloud/S3CloudProvider.swift:148-158 | Snapzy/Services/Cloud/S3CloudProvider.swift:253-263 | Snapzy/Services/Cloud/S3CloudProvider.swift:342-352 — 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 (11 lines × 3) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:867 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:867-877 | Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1689-1699 | Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:262-272 — 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 (11 lines × 3) Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:202 — Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:202-212 | Snapzy/Features/Onboarding/Components/OnboardingDiagnosticsOptInView.swift:61-71 | Snapzy/Features/Onboarding/Components/OnboardingSponsorView.swift:59-69 — 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 `Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:202` 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, `Snapzy/Features/Onboarding/Components/OnboardingSponsorView.swift:70` calls `buttonStyle` and `Snapzy/Features/Onboarding/Components/OnboardingDiagnosticsOptInView.swift:72` 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 × 3) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:123 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:123-133 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:135-145 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:147-157 — 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 (11 lines × 3) Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1347 — Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1347-1357 | Snapzy/Shared/Components/ShortcutRecorderView.swift:173-183 | Snapzy/Shared/Components/SingleKeyRecorderView.swift:172-182 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×5
  • Duplicated block (9 lines × 3) Snapzy/Features/QuickAccess/QuickAccessManager.swift:1103 — Snapzy/Features/QuickAccess/QuickAccessManager.swift:1103-1111 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:1164-1172 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:1195-1203 — 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. 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 (9 lines × 3) Snapzy/Services/Capture/ScreenRecordingManager.swift:1384 — Snapzy/Services/Capture/ScreenRecordingManager.swift:1384-1392 | Snapzy/Services/Capture/TempCaptureManager.swift:155-169 | Snapzy/Services/Capture/TempCaptureManager.swift:435-449 — 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 `Snapzy/Services/Capture/ScreenRecordingManager.swift:1384` 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 × 3) Snapzy/Services/Diagnostics/AppToastManager.swift:40 — Snapzy/Services/Diagnostics/AppToastManager.swift:40-48 | Snapzy/Services/Diagnostics/AppToastManager.swift:50-58 | Snapzy/Services/Diagnostics/AppToastManager.swift:60-68 — 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 (9 lines × 3) Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:327 — Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:327-335 | Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:710-718 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:89-97 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 × 3) Snapzy/Features/Recording/Managers/KeystrokeOverlayWindow.swift:36 — Snapzy/Features/Recording/Managers/KeystrokeOverlayWindow.swift:36-44 | Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:35-43 | Snapzy/Features/Recording/Managers/RecordingAnnotationOverlayWindow.swift:69-79 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Snapzy/Features/Recording/Managers/KeystrokeOverlayWindow.swift:31` calls `setupBadgeView` and `Snapzy/Features/Recording/Managers/MouseClickHighlightWindow.swift:30` 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×5
  • Duplicated block (6 lines × 3) Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:53 — Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:53-58 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:83-88 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:117-122 — 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 `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.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 before the matched lines, `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:115` calls `padding` and `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:82` 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 × 3) Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:66 — Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:66-71 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:96-101 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:130-135 — 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 `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:66` 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, `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:73` calls `padding` and `Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:137` 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 lines × 3) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:317 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:317-322 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:73-78 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:84-89 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:317` 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, `Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:83` calls `italic` and `Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:72` 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 lines × 3) Snapzy/Features/History/Components/HistoryCardView.swift:231 — Snapzy/Features/History/Components/HistoryCardView.swift:231-236 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:221-226 | Snapzy/Features/History/Components/HistoryItemView.swift:174-179 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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 × 3) Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:200 — Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:200-205 | Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:482-487 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:202-207 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) Snapzy/Features/History/Components/HistoryCardView.swift:243 — Snapzy/Features/History/Components/HistoryCardView.swift:243-250 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:233-240 | Snapzy/Features/History/Components/HistoryItemView.swift:186-193 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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 (8 lines × 3) Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:71 — Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:71-78 | Snapzy/Features/Preferences/Components/PreferencesCloudCredentialImportSheet.swift:53-60 | Snapzy/Features/Preferences/Components/PreferencesCustomOCRModelSheet.swift:97-104 — 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 `Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:71` 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 `alignment` to `.leading` in one and `.top` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/Preferences/Components/PreferencesCustomOCRModelSheet.swift:105` calls `fixedSize` and `Snapzy/Features/Preferences/Components/PreferencesCloudCredentialExportSheet.swift:79` 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 (8 lines × 3) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:409 — Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:409-416 | Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:448-455 | Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:527-534 — 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 (8 lines × 3) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:433 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:433-440 | Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:442-449 | Snapzy/Features/Recording/RecordingCoordinator.swift:1274-1281 — 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.
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: ShortcutOverlayModels.swift → AppStatusBarController.swift, CaptureViewModel.swift, PreferencesShortcutsSettingsView.swift Snapzy/Features/Shortcuts/ShortcutOverlayModels.swift — `Snapzy/Features/Shortcuts/ShortcutOverlayModels.swift` changes together with 3 other files — `Snapzy/App/AppStatusBarController.swift`, `Snapzy/Features/Capture/CaptureViewModel.swift`, `Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.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: SnapzyConfigurationDefaultDocument.swift → PreferencesKeys.swift, SnapzyConfigurationExporter.swift, SnapzyConfigurationImporter.swift Snapzy/Services/Configuration/SnapzyConfigurationDefaultDocument.swift — `Snapzy/Services/Configuration/SnapzyConfigurationDefaultDocument.swift` changes together with 3 other files — `Snapzy/Features/Preferences/Models/PreferencesKeys.swift`, `Snapzy/Services/Configuration/SnapzyConfigurationExporter.swift`, `Snapzy/Services/Configuration/SnapzyConfigurationImporter.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: AnnotateQuickPropertiesBar.swift → AnnotateCanvasDrawingView.swift, AnnotateAnnotationFactory.swift, AnnotateAnnotationRenderer.swift Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift — `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift` changes together with 3 other files — `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift`, `Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift`, `Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.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.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:605 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:605-663 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:700-776 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:813-866 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:939-986 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:1012-1064 — 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) Snapzy/Features/History/Components/HistoryCardView.swift:166 — Snapzy/Features/History/Components/HistoryCardView.swift:166-176 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:160-170 | Snapzy/Features/History/Components/HistoryToolbar.swift:121-131 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:514-524 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:908-918 — 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) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:49 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:49-141 | Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:58-84 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:15-104 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:47-163 | Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:73-124 — 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.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×3
  • Duplicated block (27 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1104 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1104-1130 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2445-2471 — 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 (27 lines × 2) Snapzy/Shared/Localization/AppLanguageManager.swift:144 — Snapzy/Shared/Localization/AppLanguageManager.swift:144-170 | scripts/swift-tools/ocr/ocr-readme-benchmark.swift:61-87 — 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. 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 (27 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:310 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:310-336 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:271-297 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:310` 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:796 — Snapzy/Features/Capture/CaptureViewModel.swift:796-821 | Snapzy/Features/Capture/CaptureViewModel.swift:899-924 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:796` 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 (26 lines × 2) Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift:254 — Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift:254-279 | Snapzy/Services/Configuration/SnapzyConfigurationShortcutCodec.swift:69-94 — 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 `Snapzy/Services/Capture/CaptureOverlayShortcutSettings.swift:254` 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 (26 lines × 2) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:295 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:295-320 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:442-467 — 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) Snapzy/Features/History/HistoryWindowController.swift:19 — Snapzy/Features/History/HistoryWindowController.swift:19-42 | Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:61-84 — before extracting anything, compare `Snapzy/Features/History/HistoryWindowController.swift` and `Snapzy/Features/History/Managers/HistoryFloatingPanel.swift` as WHOLE FILES: this scan already matched 3 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. 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 `Snapzy/Features/History/HistoryWindowController.swift:19` 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) Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:93 — Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:93-116 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:271-294 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:93` 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, `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:270` calls `cornerRadius` and `Snapzy/Features/Annotate/Components/AnnotateSidebarComponents.swift:92` 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 (24 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:375 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:375-398 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:341-364 — 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. 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×3
  • Duplicated block (10–11 lines × 2) Snapzy/Services/Capture/ScreenCaptureManager.swift:1963 — Snapzy/Services/Capture/ScreenCaptureManager.swift:1963-1973 | Snapzy/Services/Capture/ScreenRecordingManager.swift:1790-1799 — 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 `Snapzy/Services/Capture/ScreenCaptureManager.swift:1963` 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–11 lines × 2) Snapzy/Services/Cloud/CloudUsageService.swift:457 — Snapzy/Services/Cloud/CloudUsageService.swift:457-467 | Snapzy/Services/Cloud/CloudUsageService.swift:491-500 — 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 `Snapzy/Services/Cloud/CloudUsageService.swift:457` 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 (10–11 lines × 2) Snapzy/Services/History/CaptureHistoryStore.swift:64 — Snapzy/Services/History/CaptureHistoryStore.swift:64-73 | Snapzy/Services/History/CaptureHistoryStore.swift:78-88 — 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 `Snapzy/Services/History/CaptureHistoryStore.swift:64` 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) Snapzy/Services/Cloud/S3MultipartUploader.swift:162 — Snapzy/Services/Cloud/S3MultipartUploader.swift:162-171 | Snapzy/Services/Cloud/S3MultipartUploader.swift:239-248 | Snapzy/Services/Cloud/S3MultipartUploader.swift:265-274 — 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 (10 lines × 3) Snapzy/Features/History/Components/HistoryFloatingContentView.swift:347 — Snapzy/Features/History/Components/HistoryFloatingContentView.swift:347-356 | Snapzy/Features/History/Components/HistoryToolbar.swift:45-54 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:437-446 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryToolbar.swift` and `Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `Snapzy/Features/History/Components/HistoryFloatingContentView.swift:347` 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 × 3) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:868 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:868-877 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2278-2287 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2289-2298 — 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×3
  • Duplicated block (8–9 lines × 2) Snapzy/Services/Capture/ActiveWindowResolver.swift:81 — Snapzy/Services/Capture/ActiveWindowResolver.swift:81-88 | Snapzy/Services/Capture/WindowSelectionQueryService.swift:386-394 — 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 `Snapzy/Services/Capture/ActiveWindowResolver.swift:81` 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 (8–9 lines × 2) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:951 — Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:951-958 | Snapzy/Services/Capture/CaptureOutputNaming.swift:131-139 — 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 `Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:951` 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 `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 (8–9 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:84 — Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:84-91 | Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:111-119 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `3` in one and `6` 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.
D4 · Code Duplication · Duplicated block (54 lines × 2) · ×2
  • Duplicated block (54 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:790 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:790-843 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2200-2253 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:790` 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 (54 lines × 2) Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:306 — Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:306-359 | Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:402-455 — 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 `Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:306` 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.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×2
  • Duplicated block (26–27 lines × 2) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:669 — Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:669-694 | Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift:199-225 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 89 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 `Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:669` 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 (26–27 lines × 2) Snapzy/Features/Annotate/Services/AnnotateMockup3DRenderer.swift:31 — Snapzy/Features/Annotate/Services/AnnotateMockup3DRenderer.swift:31-57 | Snapzy/Features/Annotate/Services/AnnotateMockupExporter.swift:107-132 — 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 `Snapzy/Features/Annotate/Services/AnnotateMockup3DRenderer.swift:31` 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, `Snapzy/Features/Annotate/Services/AnnotateMockupExporter.swift:106` calls `frame` and `Snapzy/Features/Annotate/Services/AnnotateMockup3DRenderer.swift:30` 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.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×2
  • Duplicated block (23 lines × 3) Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:106 — Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:106-128 | Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:140-162 | Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:215-237 — 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 `Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:106` 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 (23 lines × 3) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:708 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:708-730 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:947-969 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:1020-1042 — 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.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×2
  • Duplicated block (19–22 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:660 — Snapzy/Features/Capture/CaptureViewModel.swift:660-681 | Snapzy/Features/Capture/CaptureViewModel.swift:839-857 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:660` 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–22 lines × 2) Snapzy/Features/QuickAccess/QuickAccessManager.swift:373 — Snapzy/Features/QuickAccess/QuickAccessManager.swift:373-394 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:1447-1465 — 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 `Snapzy/Features/QuickAccess/QuickAccessManager.swift:373` 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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:751 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:751-772 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:794-815 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:751` 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 (22 lines × 2) Snapzy/Features/History/Components/HistoryToolbar.swift:40 — Snapzy/Features/History/Components/HistoryToolbar.swift:40-61 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:432-453 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryToolbar.swift` and `Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `Snapzy/Features/History/Components/HistoryToolbar.swift:40` 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×2
  • Duplicated block (16–17 lines × 3) Snapzy/Features/Recording/RecordingCoordinator.swift:633 — Snapzy/Features/Recording/RecordingCoordinator.swift:633-649 | Snapzy/Features/Recording/RecordingCoordinator.swift:766-782 | Snapzy/Features/Recording/RecordingCoordinator.swift:920-935 — 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 `Snapzy/Features/Recording/RecordingCoordinator.swift:633` 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–17 lines × 3) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:314 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:314-330 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:456-472 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:1073-1088 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:334` calls `restoreGraphicsState` and `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:476` 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.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×2
  • Duplicated block (17 lines × 3) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:642 — Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:642-658 | Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift:726-742 | Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift:178-194 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 89 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 (17 lines × 3) Snapzy/Features/History/Components/HistoryCardView.swift:65 — Snapzy/Features/History/Components/HistoryCardView.swift:65-81 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:73-89 | Snapzy/Features/History/Components/HistoryItemView.swift:124-140 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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 `Snapzy/Features/History/Components/HistoryCardView.swift:65` 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) Snapzy/Services/Capture/AXElementSnapshot.swift:139 — Snapzy/Services/Capture/AXElementSnapshot.swift:139-153 | Snapzy/Services/Capture/ActiveWindowResolver.swift:112-127 — 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 (15–16 lines × 2) Snapzy/Services/Cloud/S3CloudProvider.swift:188 — Snapzy/Services/Cloud/S3CloudProvider.swift:188-203 | Snapzy/Services/Cloud/S3CloudProvider.swift:347-361 — 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 `Snapzy/Services/Cloud/S3CloudProvider.swift:188` 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×2
  • Duplicated block (13 lines × 3) Snapzy/Features/History/Components/HistoryCardView.swift:252 — Snapzy/Features/History/Components/HistoryCardView.swift:252-264 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:242-254 | Snapzy/Features/History/Components/HistoryItemView.swift:195-207 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/History/Components/HistoryCardView.swift:266` calls `relativeTimeString`, `localizedString`, `Date` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:256` 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 lines × 3) Snapzy/Features/Recording/Components/RecordingToolbarStyles.swift:58 — Snapzy/Features/Recording/Components/RecordingToolbarStyles.swift:58-70 | Snapzy/Features/Recording/Components/RecordingToolbarStyles.swift:76-88 | Snapzy/Features/Recording/Components/RecordingToolbarStyles.swift:123-135 — 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.
D4 · Code Duplication · Duplicated block (8–13 lines × 2) · ×2
  • Duplicated block (8–13 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:2019 — Snapzy/Features/Capture/CaptureViewModel.swift:2019-2026 | Snapzy/Features/Capture/CaptureViewModel.swift:2746-2758 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:2019` 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 (8–13 lines × 2) Snapzy/Features/Recording/RecordingCoordinator.swift:707 — Snapzy/Features/Recording/RecordingCoordinator.swift:707-719 | Snapzy/Features/Recording/RecordingCoordinator.swift:886-893 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1489 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1489-1500 | Snapzy/Features/QuickAccess/Components/QuickAccessDraggableView.swift:237-248 | Snapzy/Features/VideoEditor/Models/VideoEditorSessionData.swift:47-58 — 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 `Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1489` 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) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:119 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:119-130 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:274-285 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:424-435 — 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 `Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:119` 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×2
  • Duplicated block (10 lines × 4) Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:202 — Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:202-211 | Snapzy/Features/Onboarding/Components/OnboardingDiagnosticsOptInView.swift:61-70 | Snapzy/Features/Onboarding/Components/OnboardingSkipConfirmationView.swift:46-55 | Snapzy/Features/Onboarding/Components/OnboardingSponsorView.swift:59-68 — 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 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:202` 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, `Snapzy/Features/Onboarding/Components/OnboardingCompletionView.swift:200` calls `Spacer` and `Snapzy/Features/Onboarding/Components/OnboardingSkipConfirmationView.swift:44` 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 × 4) Snapzy/Features/History/Managers/HistoryFloatingManager.swift:521 — Snapzy/Features/History/Managers/HistoryFloatingManager.swift:521-531 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:120-130 | Snapzy/Features/Shortcuts/ShortcutOverlayManager.swift:88-97 | Snapzy/Services/Capture/SmartElement/SmartElementCaptureController.swift:185-194 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:176 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:176-182 | Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:315-321 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:71-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 all 3 call sites, so a change lands once.
  • Duplicated block (7 lines × 3) Snapzy/Features/Annotate/Services/AnnotateShortcutManager.swift:275 — Snapzy/Features/Annotate/Services/AnnotateShortcutManager.swift:275-281 | Snapzy/Features/Annotate/Services/AnnotateShortcutManager.swift:310-316 | Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1324-1330 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:47 — Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:47-52 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:97-102 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:36-41 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:225-230 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:47` 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, `Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:224` calls `background` and `Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:35` 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 × 4) Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:105 — Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:105-110 | Snapzy/Features/Annotate/Components/AnnotateSidebarSections.swift:124-129 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:164-169 | Snapzy/Features/VideoEditor/Components/VideoEditorVideoBackgroundSidebarView.swift:171-176 — 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.
D1 · Cyclomatic Complexity · ScrollingCaptureCoordinator.startAutoScrolling (cyclomatic 47) · ×1
  • ScrollingCaptureCoordinator.startAutoScrolling (cyclomatic 47) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:255 — ScrollingCaptureCoordinator.startAutoScrolling has cyclomatic complexity 47 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureCoordinator.refreshPreview (cyclomatic 46) · ×1
  • ScrollingCaptureCoordinator.refreshPreview (cyclomatic 46) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:761 — ScrollingCaptureCoordinator.refreshPreview has cyclomatic complexity 46 (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.
D1 · Cyclomatic Complexity · KeyboardShortcutManager.loadShortcuts (cyclomatic 41) · ×1
  • KeyboardShortcutManager.loadShortcuts (cyclomatic 41) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1201 — KeyboardShortcutManager.loadShortcuts has cyclomatic complexity 41 (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. This is NOT this file's highest cyclomatic complexity: ShortcutConfig.keyCodeToString (cyclomatic 100) 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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.mouseUp (cyclomatic 40) · ×1
  • DrawingCanvasNSView.mouseUp (cyclomatic 40) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1313 — DrawingCanvasNSView.mouseUp has cyclomatic complexity 40 (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.
D1 · Cyclomatic Complexity · AnnotateWindow.performKeyEquivalent (cyclomatic 37) · ×1
  • AnnotateWindow.performKeyEquivalent (cyclomatic 37) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:175 — AnnotateWindow.performKeyEquivalent has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureStitcher.append (cyclomatic 37) · ×1
  • ScrollingCaptureStitcher.append (cyclomatic 37) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:372 — ScrollingCaptureStitcher.append has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.mouseDragged (cyclomatic 34) · ×1
  • DrawingCanvasNSView.mouseDragged (cyclomatic 34) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1031 — DrawingCanvasNSView.mouseDragged has cyclomatic complexity 34 (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.
D1 · Cyclomatic Complexity · RecordingSession.appendVideoSample (cyclomatic 33) · ×1
  • RecordingSession.appendVideoSample (cyclomatic 33) Snapzy/Features/Recording/RecordingSession.swift:161 — RecordingSession.appendVideoSample has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · AnnotateQuickPropertiesBar.activePropertiesContent (cyclomatic 33) · ×1
  • AnnotateQuickPropertiesBar.activePropertiesContent (cyclomatic 33) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:178 — AnnotateQuickPropertiesBar.activePropertiesContent has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.keyDown (cyclomatic 32) · ×1
  • DrawingCanvasNSView.keyDown (cyclomatic 32) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:515 — DrawingCanvasNSView.keyDown has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · VideoEditorExporter.exportWithZooms (cyclomatic 30) · ×1
  • VideoEditorExporter.exportWithZooms (cyclomatic 30) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:206 — VideoEditorExporter.exportWithZooms has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · AnnotateExporter.renderFlatFinalImage (cyclomatic 29) · ×1
  • AnnotateExporter.renderFlatFinalImage (cyclomatic 29) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:403 — AnnotateExporter.renderFlatFinalImage has cyclomatic complexity 29 (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.
D1 · Cyclomatic Complexity · CloudCredentialFormView.body (cyclomatic 29) · ×1
  • CloudCredentialFormView.body (cyclomatic 29) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:816 — CloudCredentialFormView.body has cyclomatic complexity 29 (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.
D1 · Cyclomatic Complexity · AnnotateState.updateAnnotationProperties (cyclomatic 27) · ×1
  • AnnotateState.updateAnnotationProperties (cyclomatic 27) Snapzy/Features/Annotate/AnnotateState.swift:3679 — AnnotateState.updateAnnotationProperties 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.
D1 · Cyclomatic Complexity · AnnotationFactory.createAnnotation (cyclomatic 27) · ×1
  • AnnotationFactory.createAnnotation (cyclomatic 27) Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:53 — AnnotationFactory.createAnnotation has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureCoordinator.updatePreviewTruthState (cyclomatic 27) · ×1
  • ScrollingCaptureCoordinator.updatePreviewTruthState (cyclomatic 27) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1782 — ScrollingCaptureCoordinator.updatePreviewTruthState has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · KeyboardShortcutManager.saveShortcuts (cyclomatic 26) · ×1
  • KeyboardShortcutManager.saveShortcuts (cyclomatic 26) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1127 — KeyboardShortcutManager.saveShortcuts has cyclomatic complexity 26 (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. This is NOT this file's highest cyclomatic complexity: ShortcutConfig.keyCodeToString (cyclomatic 100) 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.
D1 · Cyclomatic Complexity · QuickAccessCardView.body (cyclomatic 26) · ×1
  • QuickAccessCardView.body (cyclomatic 26) Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift:46 — QuickAccessCardView.body has cyclomatic complexity 26 (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.
D1 · Cyclomatic Complexity · CaptureSettingsView.body (cyclomatic 25) · ×1
  • CaptureSettingsView.body (cyclomatic 25) Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift:117 — CaptureSettingsView.body has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureAccuracyBenchmark.run (cyclomatic 24) · ×1
  • ScrollingCaptureAccuracyBenchmark.run (cyclomatic 24) scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:165 — ScrollingCaptureAccuracyBenchmark.run has cyclomatic complexity 24 (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.
D1 · Cyclomatic Complexity · PostCaptureActionHandler.executeActions (cyclomatic 23) · ×1
  • PostCaptureActionHandler.executeActions (cyclomatic 23) Snapzy/Services/Capture/PostCaptureActionHandler.swift:281 — PostCaptureActionHandler.executeActions has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · KeyboardShortcutManager.unregisterAllShortcuts (cyclomatic 23) · ×1
  • KeyboardShortcutManager.unregisterAllShortcuts (cyclomatic 23) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1808 — KeyboardShortcutManager.unregisterAllShortcuts has cyclomatic complexity 23 (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. This is NOT this file's highest cyclomatic complexity: ShortcutConfig.keyCodeToString (cyclomatic 100) 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.
D1 · Cyclomatic Complexity · AnnotateCanvasView.body (cyclomatic 23) · ×1
  • AnnotateCanvasView.body (cyclomatic 23) Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:88 — AnnotateCanvasView.body has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · AnnotateWindow.sendEvent (cyclomatic 23) · ×1
  • AnnotateWindow.sendEvent (cyclomatic 23) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:364 — AnnotateWindow.sendEvent has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureStitcher.isAcceptable (cyclomatic 23) · ×1
  • ScrollingCaptureStitcher.isAcceptable (cyclomatic 23) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1397 — ScrollingCaptureStitcher.isAcceptable has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · AreaSelectionMagnifier.update (cyclomatic 22) · ×1
  • AreaSelectionMagnifier.update (cyclomatic 22) Snapzy/Services/Capture/AreaSelectionMagnifier.swift:340 — AreaSelectionMagnifier.update has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · LiquidGlassSegmentedControl.body (cyclomatic 22) · ×1
  • LiquidGlassSegmentedControl.body (cyclomatic 22) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSegmentedControl.swift:29 — LiquidGlassSegmentedControl.body has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · AnnotateState.annotationPropertiesWillChange (cyclomatic 21) · ×1
  • AnnotateState.annotationPropertiesWillChange (cyclomatic 21) Snapzy/Features/Annotate/AnnotateState.swift:3838 — AnnotateState.annotationPropertiesWillChange has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · InlineAreaAnnotateRootView.body (cyclomatic 21) · ×1
  • InlineAreaAnnotateRootView.body (cyclomatic 21) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:234 — InlineAreaAnnotateRootView.body 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.
D1 · Cyclomatic Complexity · ScreenCaptureViewModel.captureOCR (cyclomatic 21) · ×1
  • ScreenCaptureViewModel.captureOCR (cyclomatic 21) Snapzy/Features/Capture/CaptureViewModel.swift:2366 — ScreenCaptureViewModel.captureOCR 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. This is NOT this file's highest cyclomatic complexity: ScreenCaptureViewModel.shortcutTriggered (cyclomatic 24) 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.
D1 · Cyclomatic Complexity · VideoEditorState.undo (cyclomatic 21) · ×1
  • VideoEditorState.undo (cyclomatic 21) Snapzy/Features/VideoEditor/VideoEditorState.swift:1941 — VideoEditorState.undo has cyclomatic complexity 21 (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 shape REPEATS in the file: one other method here (VideoEditorState.redo) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · VideoEditorState.redo (cyclomatic 21) · ×1
  • VideoEditorState.redo (cyclomatic 21) Snapzy/Features/VideoEditor/VideoEditorState.swift:2045 — VideoEditorState.redo has cyclomatic complexity 21 (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 shape REPEATS in the file: one other method here (VideoEditorState.undo) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ScreenRecordingManager.prepareRecording (cyclomatic 21) · ×1
  • ScreenRecordingManager.prepareRecording (cyclomatic 21) Snapzy/Services/Capture/ScreenRecordingManager.swift:790 — ScreenRecordingManager.prepareRecording 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.
D1 · Cyclomatic Complexity · AnnotateState.applySharedParameterDefaults (cyclomatic 20) · ×1
  • AnnotateState.applySharedParameterDefaults (cyclomatic 20) Snapzy/Features/Annotate/AnnotateState.swift:4586 — AnnotateState.applySharedParameterDefaults 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.
D1 · Cyclomatic Complexity · ScreenCaptureViewModel.startAreaCapture (cyclomatic 20) · ×1
  • ScreenCaptureViewModel.startAreaCapture (cyclomatic 20) Snapzy/Features/Capture/CaptureViewModel.swift:657 — ScreenCaptureViewModel.startAreaCapture has cyclomatic complexity 20 (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. This is NOT this file's highest cyclomatic complexity: ScreenCaptureViewModel.shortcutTriggered (cyclomatic 24) 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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.mouseDown (cyclomatic 20) · ×1
  • DrawingCanvasNSView.mouseDown (cyclomatic 20) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:817 — DrawingCanvasNSView.mouseDown 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.
D1 · Cyclomatic Complexity · AnnotateState.updateDefaultAnnotationProperties (cyclomatic 19) · ×1
  • AnnotateState.updateDefaultAnnotationProperties (cyclomatic 19) Snapzy/Features/Annotate/AnnotateState.swift:4654 — AnnotateState.updateDefaultAnnotationProperties has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · ScreenCaptureViewModel.startFrozenAreaSelection (cyclomatic 19) · ×1
  • ScreenCaptureViewModel.startFrozenAreaSelection (cyclomatic 19) Snapzy/Features/Capture/CaptureViewModel.swift:1037 — ScreenCaptureViewModel.startFrozenAreaSelection 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. This is NOT this file's highest cyclomatic complexity: ScreenCaptureViewModel.shortcutTriggered (cyclomatic 24) 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.
D1 · Cyclomatic Complexity · AreaSelectionController.startSelectionSession (cyclomatic 19) · ×1
  • AreaSelectionController.startSelectionSession (cyclomatic 19) Snapzy/Services/Capture/AreaSelectionWindow.swift:553 — AreaSelectionController.startSelectionSession 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.
D1 · Cyclomatic Complexity · WindowSelectionQueryService.prepareSnapshot (cyclomatic 19) · ×1
  • WindowSelectionQueryService.prepareSnapshot (cyclomatic 19) Snapzy/Services/Capture/WindowSelectionQueryService.swift:52 — WindowSelectionQueryService.prepareSnapshot 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.
D1 · Cyclomatic Complexity · AnnotateBottomBarView.handleCloudUpload (cyclomatic 19) · ×1
  • AnnotateBottomBarView.handleCloudUpload (cyclomatic 19) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:553 — AnnotateBottomBarView.handleCloudUpload 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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.handleCropResize (cyclomatic 19) · ×1
  • DrawingCanvasNSView.handleCropResize (cyclomatic 19) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2382 — DrawingCanvasNSView.handleCropResize 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.
D1 · Cyclomatic Complexity · AnnotateState.autoCropToContent (cyclomatic 18) · ×1
  • AnnotateState.autoCropToContent (cyclomatic 18) Snapzy/Features/Annotate/AnnotateState.swift:3120 — AnnotateState.autoCropToContent 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.
D1 · Cyclomatic Complexity · ScreenCaptureViewModel.prepareLazyFrozenDisplay (cyclomatic 18) · ×1
  • ScreenCaptureViewModel.prepareLazyFrozenDisplay (cyclomatic 18) Snapzy/Features/Capture/CaptureViewModel.swift:1741 — ScreenCaptureViewModel.prepareLazyFrozenDisplay 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. This is NOT this file's highest cyclomatic complexity: ScreenCaptureViewModel.shortcutTriggered (cyclomatic 24) 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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.applyGestureResize (cyclomatic 18) · ×1
  • DrawingCanvasNSView.applyGestureResize (cyclomatic 18) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1229 — DrawingCanvasNSView.applyGestureResize 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.
D1 · Cyclomatic Complexity · AnnotationRenderer.drawCurrentStroke (cyclomatic 18) · ×1
  • AnnotationRenderer.drawCurrentStroke (cyclomatic 18) Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:128 — AnnotationRenderer.drawCurrentStroke 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.
D1 · Cyclomatic Complexity · ToolError.errorDescription (cyclomatic 17) · ×1
  • ToolError.errorDescription (cyclomatic 17) tools/localization/CatalogTool.swift:60 — ToolError.errorDescription 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.
D1 · Cyclomatic Complexity · RecordingSession.appendAudioSample (cyclomatic 17) · ×1
  • RecordingSession.appendAudioSample (cyclomatic 17) Snapzy/Features/Recording/RecordingSession.swift:275 — RecordingSession.appendAudioSample has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · RecordingSession.appendMicrophoneSample (cyclomatic 17) · ×1
  • RecordingSession.appendMicrophoneSample (cyclomatic 17) Snapzy/Features/Recording/RecordingSession.swift:319 — RecordingSession.appendMicrophoneSample has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · SplashWindowController.showWindow (cyclomatic 17) · ×1
  • SplashWindowController.showWindow (cyclomatic 17) Snapzy/Features/Splash/SplashWindow.swift:119 — SplashWindowController.showWindow has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · VideoEditorState.restoreSessionIfNeeded (cyclomatic 17) · ×1
  • VideoEditorState.restoreSessionIfNeeded (cyclomatic 17) Snapzy/Features/VideoEditor/VideoEditorState.swift:1091 — VideoEditorState.restoreSessionIfNeeded has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · VideoEditorState.scheduleSpeedPreviewRebuild (cyclomatic 17) · ×1
  • VideoEditorState.scheduleSpeedPreviewRebuild (cyclomatic 17) Snapzy/Features/VideoEditor/VideoEditorState.swift:1401 — VideoEditorState.scheduleSpeedPreviewRebuild has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · AreaSelectionController.runSessionPresentationCheck (cyclomatic 17) · ×1
  • AreaSelectionController.runSessionPresentationCheck (cyclomatic 17) Snapzy/Services/Capture/AreaSelectionWindow.swift:836 — AreaSelectionController.runSessionPresentationCheck has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · RecordingAudioLevelMeter.rms (cyclomatic 17) · ×1
  • RecordingAudioLevelMeter.rms (cyclomatic 17) Snapzy/Services/Capture/RecordingAudioLevelMeter.swift:120 — RecordingAudioLevelMeter.rms has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · ScreenCaptureManager.scanTransparentFringeBounds (cyclomatic 17) · ×1
  • ScreenCaptureManager.scanTransparentFringeBounds (cyclomatic 17) Snapzy/Services/Capture/ScreenCaptureManager.swift:2294 — ScreenCaptureManager.scanTransparentFringeBounds has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · WindowSelectionQueryService.captureImmediateMenuBarPopoverCaptures (cyclomatic 17) · ×1
  • WindowSelectionQueryService.captureImmediateMenuBarPopoverCaptures (cyclomatic 17) Snapzy/Services/Capture/WindowSelectionQueryService.swift:176 — WindowSelectionQueryService.captureImmediateMenuBarPopoverCaptures has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · AnnotationRenderer.drawBlur (cyclomatic 17) · ×1
  • AnnotationRenderer.drawBlur (cyclomatic 17) Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:641 — AnnotationRenderer.drawBlur 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.
D1 · Cyclomatic Complexity · HistoryFloatingPanel.performKeyEquivalent (cyclomatic 17) · ×1
  • HistoryFloatingPanel.performKeyEquivalent (cyclomatic 17) Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:61 — HistoryFloatingPanel.performKeyEquivalent has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · SnapzyOnboardingBarSegment.body (cyclomatic 17) · ×1
  • SnapzyOnboardingBarSegment.body (cyclomatic 17) Snapzy/Features/Onboarding/Components/SnapzyOnboardingActionBar.swift:96 — SnapzyOnboardingBarSegment.body has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · RecordingRegionOverlayView.calculateResizedRect (cyclomatic 17) · ×1
  • RecordingRegionOverlayView.calculateResizedRect (cyclomatic 17) Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:429 — RecordingRegionOverlayView.calculateResizedRect 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.
D1 · Cyclomatic Complexity · RecordingRegionOverlayView.drawGuidance (cyclomatic 17) · ×1
  • RecordingRegionOverlayView.drawGuidance (cyclomatic 17) Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:802 — RecordingRegionOverlayView.drawGuidance 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.
D1 · Cyclomatic Complexity · ScrollingCaptureCoordinator.finish (cyclomatic 17) · ×1
  • ScrollingCaptureCoordinator.finish (cyclomatic 17) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:600 — ScrollingCaptureCoordinator.finish 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.
D1 · Cyclomatic Complexity · LiquidGlassBarSegment.body (cyclomatic 17) · ×1
  • LiquidGlassBarSegment.body (cyclomatic 17) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassActionBar.swift:85 — LiquidGlassBarSegment.body 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.
D1 · Cyclomatic Complexity · LiquidGlassSurface.body (cyclomatic 17) · ×1
  • LiquidGlassSurface.body (cyclomatic 17) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift:86 — LiquidGlassSurface.body has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · AnnotateState.visionSuggestedAutoCropRect (cyclomatic 16) · ×1
  • AnnotateState.visionSuggestedAutoCropRect (cyclomatic 16) Snapzy/Features/Annotate/AnnotateState.swift:3176 — AnnotateState.visionSuggestedAutoCropRect 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.
D1 · Cyclomatic Complexity · AnnotateTextSnapping.resolve (cyclomatic 16) · ×1
  • AnnotateTextSnapping.resolve (cyclomatic 16) Snapzy/Features/Annotate/AnnotateTextSnapping.swift:59 — AnnotateTextSnapping.resolve has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · ScreenCaptureViewModel.captureObjectCutout (cyclomatic 16) · ×1
  • ScreenCaptureViewModel.captureObjectCutout (cyclomatic 16) Snapzy/Features/Capture/CaptureViewModel.swift:2696 — ScreenCaptureViewModel.captureObjectCutout has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: ScreenCaptureViewModel.shortcutTriggered (cyclomatic 24) 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.
D1 · Cyclomatic Complexity · RecordingSession.logAudioSampleFormatIfNeeded (cyclomatic 16) · ×1
  • RecordingSession.logAudioSampleFormatIfNeeded (cyclomatic 16) Snapzy/Features/Recording/RecordingSession.swift:451 — RecordingSession.logAudioSampleFormatIfNeeded has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · VideoEditorState.play (cyclomatic 16) · ×1
  • VideoEditorState.play (cyclomatic 16) Snapzy/Features/VideoEditor/VideoEditorState.swift:1231 — VideoEditorState.play has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · AreaSelectionOverlayView.handlePrimaryMouseUp (cyclomatic 16) · ×1
  • AreaSelectionOverlayView.handlePrimaryMouseUp (cyclomatic 16) Snapzy/Services/Capture/AreaSelectionWindow.swift:4690 — AreaSelectionOverlayView.handlePrimaryMouseUp has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · FrozenAreaCaptureSession.cropCompositeImage (cyclomatic 16) · ×1
  • FrozenAreaCaptureSession.cropCompositeImage (cyclomatic 16) Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:228 — FrozenAreaCaptureSession.cropCompositeImage has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · ScreenRecordingManager.makeContentFilter (cyclomatic 16) · ×1
  • ScreenRecordingManager.makeContentFilter (cyclomatic 16) Snapzy/Services/Capture/ScreenRecordingManager.swift:1957 — ScreenRecordingManager.makeContentFilter has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · SnapzyConfigurationImporter.collectQuickAccess (cyclomatic 16) · ×1
  • SnapzyConfigurationImporter.collectQuickAccess (cyclomatic 16) Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:344 — SnapzyConfigurationImporter.collectQuickAccess has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · AnnotateBottomBarView.annotateActionButtons (cyclomatic 16) · ×1
  • AnnotateBottomBarView.annotateActionButtons (cyclomatic 16) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:392 — AnnotateBottomBarView.annotateActionButtons has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · DrawingCanvasNSView.resizeHandleRects (cyclomatic 16) · ×1
  • DrawingCanvasNSView.resizeHandleRects (cyclomatic 16) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:671 — DrawingCanvasNSView.resizeHandleRects has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · BlurEffectRenderer.drawCIFilterRegion (cyclomatic 16) · ×1
  • BlurEffectRenderer.drawCIFilterRegion (cyclomatic 16) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:415 — BlurEffectRenderer.drawCIFilterRegion has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · CloudCredentialFormView.saveAndTest (cyclomatic 16) · ×1
  • CloudCredentialFormView.saveAndTest (cyclomatic 16) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:1272 — CloudCredentialFormView.saveAndTest has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · VideoEditorClipStripView.bodyGesture (cyclomatic 16) · ×1
  • VideoEditorClipStripView.bodyGesture (cyclomatic 16) Snapzy/Features/VideoEditor/Components/VideoEditorClipStripView.swift:405 — VideoEditorClipStripView.bodyGesture has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureCoordinator.waitForSettledAutoScrollFrame (cyclomatic 16) · ×1
  • ScrollingCaptureCoordinator.waitForSettledAutoScrollFrame (cyclomatic 16) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:509 — ScrollingCaptureCoordinator.waitForSettledAutoScrollFrame has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureSessionMetrics.recordRefreshSuccess (cyclomatic 16) · ×1
  • ScrollingCaptureSessionMetrics.recordRefreshSuccess (cyclomatic 16) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureMetrics.swift:155 — ScrollingCaptureSessionMetrics.recordRefreshSuccess has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureStitcher.priorPenalty (cyclomatic 16) · ×1
  • ScrollingCaptureStitcher.priorPenalty (cyclomatic 16) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1293 — ScrollingCaptureStitcher.priorPenalty has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · ScrollingCaptureStitcher.isAmbiguous (cyclomatic 16) · ×1
  • ScrollingCaptureStitcher.isAmbiguous (cyclomatic 16) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1443 — ScrollingCaptureStitcher.isAmbiguous 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.
D2 · Cognitive Complexity · ScrollingCaptureCoordinator.refreshPreview (cognitive 83) · ×1
  • ScrollingCaptureCoordinator.refreshPreview (cognitive 83) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:761 — ScrollingCaptureCoordinator.refreshPreview has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 14 (37 pts), if/else 21 (36 pts), boolean chains 7, match/switch 1 (2 pts), error handling 1 (nesting depth added 39). 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.
D2 · Cognitive Complexity · DrawingCanvasNSView.mouseUp (cognitive 82) · ×1
  • DrawingCanvasNSView.mouseUp (cognitive 82) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1313 — DrawingCanvasNSView.mouseUp has cognitive complexity 82 (threshold 15). Drivers by points: if/else 27 (63 pts), boolean chains 8, loops 2 (5 pts), match/switch 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 42). 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.
D2 · Cognitive Complexity · ScrollingCaptureCoordinator.startAutoScrolling (cognitive 70) · ×1
  • ScrollingCaptureCoordinator.startAutoScrolling (cognitive 70) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:255 — ScrollingCaptureCoordinator.startAutoScrolling has cognitive complexity 70 (threshold 15). Drivers by points: if/else 26 (50 pts), boolean chains 15, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 26). 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.
D2 · Cognitive Complexity · DrawingCanvasNSView.mouseDragged (cognitive 49) · ×1
  • DrawingCanvasNSView.mouseDragged (cognitive 49) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1031 — DrawingCanvasNSView.mouseDragged has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 12, loops 2 (4 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 16). 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.
D2 · Cognitive Complexity · DrawingCanvasNSView.keyDown (cognitive 45) · ×1
  • DrawingCanvasNSView.keyDown (cognitive 45) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:515 — DrawingCanvasNSView.keyDown has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 9, match/switch 1, ternaries 1 (nesting depth added 17). 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.
D2 · Cognitive Complexity · CloudCredentialFormView.body (cognitive 45) · ×1
  • CloudCredentialFormView.body (cognitive 45) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:816 — CloudCredentialFormView.body has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (32 pts), ternaries 4 (8 pts), boolean chains 5 (nesting depth added 12). 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.
D2 · Cognitive Complexity · WindowSelectionQueryService.prepareSnapshot (cognitive 44) · ×1
  • WindowSelectionQueryService.prepareSnapshot (cognitive 44) Snapzy/Services/Capture/WindowSelectionQueryService.swift:52 — WindowSelectionQueryService.prepareSnapshot has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (30 pts), ternaries 3 (9 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 26). 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.
D2 · Cognitive Complexity · RecordingSession.appendVideoSample (cognitive 41) · ×1
  • RecordingSession.appendVideoSample (cognitive 41) Snapzy/Features/Recording/RecordingSession.swift:161 — RecordingSession.appendVideoSample has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 15, ternaries 2 (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.
D2 · Cognitive Complexity · KeyboardShortcutManager.loadShortcuts (cognitive 40) · ×1
  • KeyboardShortcutManager.loadShortcuts (cognitive 40) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1201 — KeyboardShortcutManager.loadShortcuts has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 20, if/else 20. 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.
D2 · Cognitive Complexity · AnnotateWindow.performKeyEquivalent (cognitive 40) · ×1
  • AnnotateWindow.performKeyEquivalent (cognitive 40) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:175 — AnnotateWindow.performKeyEquivalent has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 13, match/switch 1 (2 pts) (nesting depth added 6). 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.
D2 · Cognitive Complexity · ScrollingCaptureCoordinator.updatePreviewTruthState (cognitive 40) · ×1
  • ScrollingCaptureCoordinator.updatePreviewTruthState (cognitive 40) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1782 — ScrollingCaptureCoordinator.updatePreviewTruthState has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 3 (9 pts), boolean chains 8, match/switch 1 (nesting depth added 12). 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.
D2 · Cognitive Complexity · ScrollingCaptureStitcher.append (cognitive 40) · ×1
  • ScrollingCaptureStitcher.append (cognitive 40) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:372 — ScrollingCaptureStitcher.append has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 14, ternaries 7 (8 pts) (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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.startFrozenAreaSelection (cognitive 38) · ×1
  • ScreenCaptureViewModel.startFrozenAreaSelection (cognitive 38) Snapzy/Features/Capture/CaptureViewModel.swift:1037 — ScreenCaptureViewModel.startFrozenAreaSelection has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (25 pts), error handling 2 (6 pts), ternaries 1 (4 pts), match/switch 2, boolean chains 1 (nesting depth added 20). 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.
D2 · Cognitive Complexity · VideoEditorExporter.exportWithZooms (cognitive 38) · ×1
  • VideoEditorExporter.exportWithZooms (cognitive 38) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:206 — VideoEditorExporter.exportWithZooms has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 6, loops 3 (4 pts), error handling 2, ternaries 1 (nesting depth added 7). 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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.captureOCR (cognitive 36) · ×1
  • ScreenCaptureViewModel.captureOCR (cognitive 36) Snapzy/Features/Capture/CaptureViewModel.swift:2366 — ScreenCaptureViewModel.captureOCR has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 3 (6 pts), boolean chains 2, error handling 1 (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.
D2 · Cognitive Complexity · CaptureSettingsView.body (cognitive 34) · ×1
  • CaptureSettingsView.body (cognitive 34) Snapzy/Features/Preferences/Components/PreferencesCaptureSettingsView.swift:117 — CaptureSettingsView.body has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (33 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.
D2 · Cognitive Complexity · ShortcutsSettingsView.body (cognitive 33) · ×1
  • ShortcutsSettingsView.body (cognitive 33) Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:124 — ShortcutsSettingsView.body has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 10 (13 pts) (nesting depth added 16). 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.
D2 · Cognitive Complexity · AnnotateQuickPropertiesBar.activePropertiesContent (cognitive 32) · ×1
  • AnnotateQuickPropertiesBar.activePropertiesContent (cognitive 32) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:178 — AnnotateQuickPropertiesBar.activePropertiesContent has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 29, ternaries 3. 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.
D2 · Cognitive Complexity · AnnotateState.updateAnnotationProperties (cognitive 31) · ×1
  • AnnotateState.updateAnnotationProperties (cognitive 31) Snapzy/Features/Annotate/AnnotateState.swift:3679 — AnnotateState.updateAnnotationProperties has cognitive complexity 31 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 6 (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.
D2 · Cognitive Complexity · PostCaptureActionHandler.executeActions (cognitive 31) · ×1
  • PostCaptureActionHandler.executeActions (cognitive 31) Snapzy/Services/Capture/PostCaptureActionHandler.swift:281 — PostCaptureActionHandler.executeActions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 7 (9 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 7). 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.
D2 · Cognitive Complexity · ScrollingCaptureAccuracyBenchmark.run (cognitive 31) · ×1
  • ScrollingCaptureAccuracyBenchmark.run (cognitive 31) scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:165 — ScrollingCaptureAccuracyBenchmark.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 12, loops 1, ternaries 1 (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.
D2 · Cognitive Complexity · SandboxOffDataMigrationService.mergeDirectoryIfPresent (cognitive 30) · ×1
  • SandboxOffDataMigrationService.mergeDirectoryIfPresent (cognitive 30) Snapzy/Services/Migration/SandboxOffDataMigrationService.swift:277 — SandboxOffDataMigrationService.mergeDirectoryIfPresent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (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.
D2 · Cognitive Complexity · AnnotateBottomBarView.handleCloudUpload (cognitive 30) · ×1
  • AnnotateBottomBarView.handleCloudUpload (cognitive 30) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:553 — AnnotateBottomBarView.handleCloudUpload has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, error handling 2 (4 pts), ternaries 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.
D2 · Cognitive Complexity · InlineAreaAnnotateRootView.body (cognitive 29) · ×1
  • InlineAreaAnnotateRootView.body (cognitive 29) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:234 — InlineAreaAnnotateRootView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, match/switch 1, ternaries 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.
D2 · Cognitive Complexity · DrawingCanvasNSView.applyGestureResize (cognitive 28) · ×1
  • DrawingCanvasNSView.applyGestureResize (cognitive 28) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:1229 — DrawingCanvasNSView.applyGestureResize has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 6 (9 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 12). 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.
D2 · Cognitive Complexity · QuickAccessCardView.body (cognitive 28) · ×1
  • QuickAccessCardView.body (cognitive 28) Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift:46 — QuickAccessCardView.body has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 11, ternaries 3 (4 pts) (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.
D2 · Cognitive Complexity · VideoEditorState.makeSpeedPreviewItem (cognitive 27) · ×1
  • VideoEditorState.makeSpeedPreviewItem (cognitive 27) Snapzy/Features/VideoEditor/VideoEditorState.swift:1484 — VideoEditorState.makeSpeedPreviewItem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3 (4 pts), ternaries 1 (4 pts) (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.
D2 · Cognitive Complexity · AreaSelectionController.startSelectionSession (cognitive 27) · ×1
  • AreaSelectionController.startSelectionSession (cognitive 27) Snapzy/Services/Capture/AreaSelectionWindow.swift:553 — AreaSelectionController.startSelectionSession has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, ternaries 2, loops 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.
D2 · Cognitive Complexity · AreaSelectionOverlayView.handlePrimaryMouseUp (cognitive 27) · ×1
  • AreaSelectionOverlayView.handlePrimaryMouseUp (cognitive 27) Snapzy/Services/Capture/AreaSelectionWindow.swift:4690 — AreaSelectionOverlayView.handlePrimaryMouseUp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 16). 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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.prepareLazyFrozenDisplay (cognitive 26) · ×1
  • ScreenCaptureViewModel.prepareLazyFrozenDisplay (cognitive 26) Snapzy/Features/Capture/CaptureViewModel.swift:1741 — ScreenCaptureViewModel.prepareLazyFrozenDisplay has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 1 (3 pts), boolean chains 2, error handling 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.
D2 · Cognitive Complexity · AreaSelectionController.runSessionPresentationCheck (cognitive 26) · ×1
  • AreaSelectionController.runSessionPresentationCheck (cognitive 26) Snapzy/Services/Capture/AreaSelectionWindow.swift:836 — AreaSelectionController.runSessionPresentationCheck has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (2 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.
D2 · Cognitive Complexity · WindowSelectionQueryService.captureImmediateMenuBarPopoverCaptures (cognitive 26) · ×1
  • WindowSelectionQueryService.captureImmediateMenuBarPopoverCaptures (cognitive 26) Snapzy/Services/Capture/WindowSelectionQueryService.swift:176 — WindowSelectionQueryService.captureImmediateMenuBarPopoverCaptures has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 5, loops 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.
D2 · Cognitive Complexity · S3MultipartUploader.upload (cognitive 26) · ×1
  • S3MultipartUploader.upload (cognitive 26) Snapzy/Services/Cloud/S3MultipartUploader.swift:47 — S3MultipartUploader.upload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), error handling 2 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · DrawingCanvasNSView.resizeHandleRects (cognitive 26) · ×1
  • DrawingCanvasNSView.resizeHandleRects (cognitive 26) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:671 — DrawingCanvasNSView.resizeHandleRects has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 3 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 12). 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.
D2 · Cognitive Complexity · ScrollingCaptureStitcher.isAcceptable (cognitive 26) · ×1
  • ScrollingCaptureStitcher.isAcceptable (cognitive 26) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1397 — ScrollingCaptureStitcher.isAcceptable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, ternaries 3 (4 pts), 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.
D2 · Cognitive Complexity · ScreenCaptureManager.captureAllDisplays (cognitive 25) · ×1
  • ScreenCaptureManager.captureAllDisplays (cognitive 25) Snapzy/Services/Capture/ScreenCaptureManager.swift:673 — ScreenCaptureManager.captureAllDisplays has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (8 pts), loops 2 (4 pts), boolean chains 1, error handling 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.
D2 · Cognitive Complexity · ScreenRecordingManager.prepareRecording (cognitive 25) · ×1
  • ScreenRecordingManager.prepareRecording (cognitive 25) Snapzy/Services/Capture/ScreenRecordingManager.swift:790 — ScreenRecordingManager.prepareRecording has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 5 (6 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · KeyboardShortcutManager.saveShortcuts (cognitive 25) · ×1
  • KeyboardShortcutManager.saveShortcuts (cognitive 25) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1127 — KeyboardShortcutManager.saveShortcuts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 25. 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.
D2 · Cognitive Complexity · DrawingCanvasNSView.mouseDown (cognitive 25) · ×1
  • DrawingCanvasNSView.mouseDown (cognitive 25) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:817 — DrawingCanvasNSView.mouseDown has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · AnnotateWindow.sendEvent (cognitive 25) · ×1
  • AnnotateWindow.sendEvent (cognitive 25) Snapzy/Features/Annotate/Managers/AnnotateWindow.swift:364 — AnnotateWindow.sendEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, match/switch 1 (nesting depth added 10). 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.
D2 · Cognitive Complexity · AnnotateExporter.renderFlatFinalImage (cognitive 25) · ×1
  • AnnotateExporter.renderFlatFinalImage (cognitive 25) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:403 — AnnotateExporter.renderFlatFinalImage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 6, loops 1, match/switch 1 (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.
D2 · Cognitive Complexity · AnnotateState.applySharedParameterDefaults (cognitive 24) · ×1
  • AnnotateState.applySharedParameterDefaults (cognitive 24) Snapzy/Features/Annotate/AnnotateState.swift:4586 — AnnotateState.applySharedParameterDefaults has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9 (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.
D2 · Cognitive Complexity · RecordingAudioLevelMeter.rms (cognitive 24) · ×1
  • RecordingAudioLevelMeter.rms (cognitive 24) Snapzy/Services/Capture/RecordingAudioLevelMeter.swift:120 — RecordingAudioLevelMeter.rms has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (10 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · VideoEditorCameraCPUProbe.main (cognitive 24) · ×1
  • VideoEditorCameraCPUProbe.main (cognitive 24) scripts/swift-tools/video-editor-performance/camera-cpu-probe.swift:11 — VideoEditorCameraCPUProbe.main has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (9 pts), ternaries 4, boolean chains 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.
D2 · Cognitive Complexity · ScrollingCaptureCoordinator.waitForSettledAutoScrollFrame (cognitive 24) · ×1
  • ScrollingCaptureCoordinator.waitForSettledAutoScrollFrame (cognitive 24) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:509 — ScrollingCaptureCoordinator.waitForSettledAutoScrollFrame has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, loops 2, ternaries 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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.refreshFrozenDisplaysAfterTransition (cognitive 23) · ×1
  • ScreenCaptureViewModel.refreshFrozenDisplaysAfterTransition (cognitive 23) Snapzy/Features/Capture/CaptureViewModel.swift:1884 — ScreenCaptureViewModel.refreshFrozenDisplaysAfterTransition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, error handling 1 (2 pts), loops 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.
D2 · Cognitive Complexity · RecordingSession.appendMicrophoneSample (cognitive 23) · ×1
  • RecordingSession.appendMicrophoneSample (cognitive 23) Snapzy/Features/Recording/RecordingSession.swift:319 — RecordingSession.appendMicrophoneSample has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, ternaries 1 (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.
D2 · Cognitive Complexity · GoogleDriveCloudProvider.performResumableUpload (cognitive 23) · ×1
  • GoogleDriveCloudProvider.performResumableUpload (cognitive 23) Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:333 — GoogleDriveCloudProvider.performResumableUpload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 1 (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.
D2 · Cognitive Complexity · AnnotateCanvasView.body (cognitive 23) · ×1
  • AnnotateCanvasView.body (cognitive 23) Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:88 — AnnotateCanvasView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 11. 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.
D2 · Cognitive Complexity · AnnotationFactory.createAnnotation (cognitive 23) · ×1
  • AnnotationFactory.createAnnotation (cognitive 23) Snapzy/Features/Annotate/Services/AnnotateAnnotationFactory.swift:53 — AnnotationFactory.createAnnotation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 2 (4 pts), match/switch 2, boolean chains 1 (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.
D2 · Cognitive Complexity · AnnotationRenderer.drawCurrentStroke (cognitive 23) · ×1
  • AnnotationRenderer.drawCurrentStroke (cognitive 23) Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:128 — AnnotationRenderer.drawCurrentStroke has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (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.
D2 · Cognitive Complexity · LiquidGlassSurface.body (cognitive 23) · ×1
  • LiquidGlassSurface.body (cognitive 23) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSurface.swift:86 — LiquidGlassSurface.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, ternaries 1 (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.
D2 · Cognitive Complexity · RecordingSession.appendAudioSample (cognitive 22) · ×1
  • RecordingSession.appendAudioSample (cognitive 22) Snapzy/Features/Recording/RecordingSession.swift:275 — RecordingSession.appendAudioSample has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, ternaries 1 (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.
D2 · Cognitive Complexity · AreaSelectionMagnifier.update (cognitive 22) · ×1
  • AreaSelectionMagnifier.update (cognitive 22) Snapzy/Services/Capture/AreaSelectionMagnifier.swift:340 — AreaSelectionMagnifier.update has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 8, ternaries 2. 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.
D2 · Cognitive Complexity · SnapzyConfigurationImporter.collectQuickAccess (cognitive 22) · ×1
  • SnapzyConfigurationImporter.collectQuickAccess (cognitive 22) Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:344 — SnapzyConfigurationImporter.collectQuickAccess has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · KeyboardShortcutManager.unregisterAllShortcuts (cognitive 22) · ×1
  • KeyboardShortcutManager.unregisterAllShortcuts (cognitive 22) Snapzy/Services/Shortcuts/KeyboardShortcutManager.swift:1808 — KeyboardShortcutManager.unregisterAllShortcuts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. 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.
D2 · Cognitive Complexity · HistoryFloatingPanel.performKeyEquivalent (cognitive 22) · ×1
  • HistoryFloatingPanel.performKeyEquivalent (cognitive 22) Snapzy/Features/History/Managers/HistoryFloatingPanel.swift:61 — HistoryFloatingPanel.performKeyEquivalent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6 (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.
D2 · Cognitive Complexity · LiquidGlassSegmentedControl.body (cognitive 22) · ×1
  • LiquidGlassSegmentedControl.body (cognitive 22) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassSegmentedControl.swift:29 — LiquidGlassSegmentedControl.body has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 17 (18 pts), boolean chains 3, if/else 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.
D2 · Cognitive Complexity · AppDelegate.presentDatabaseRecoveryFlow (cognitive 21) · ×1
  • AppDelegate.presentDatabaseRecoveryFlow (cognitive 21) Snapzy/App/SnapzyApp.swift:277 — AppDelegate.presentDatabaseRecoveryFlow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 2 (8 pts), error handling 2 (6 pts), match/switch 2 (6 pts), loops 1 (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.
D2 · Cognitive Complexity · AnnotateState.updateDefaultAnnotationProperties (cognitive 21) · ×1
  • AnnotateState.updateDefaultAnnotationProperties (cognitive 21) Snapzy/Features/Annotate/AnnotateState.swift:4654 — AnnotateState.updateDefaultAnnotationProperties has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.startAreaCapture (cognitive 21) · ×1
  • ScreenCaptureViewModel.startAreaCapture (cognitive 21) Snapzy/Features/Capture/CaptureViewModel.swift:657 — ScreenCaptureViewModel.startAreaCapture has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 4, error handling 2 (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.
D2 · Cognitive Complexity · VideoEditorState.play (cognitive 21) · ×1
  • VideoEditorState.play (cognitive 21) Snapzy/Features/VideoEditor/VideoEditorState.swift:1231 — VideoEditorState.play has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 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.
D2 · Cognitive Complexity · VideoEditorState.scheduleSpeedPreviewRebuild (cognitive 21) · ×1
  • VideoEditorState.scheduleSpeedPreviewRebuild (cognitive 21) Snapzy/Features/VideoEditor/VideoEditorState.swift:1401 — VideoEditorState.scheduleSpeedPreviewRebuild has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, error handling 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.
D2 · Cognitive Complexity · FrozenAreaCaptureSession.cropCompositeImage (cognitive 21) · ×1
  • FrozenAreaCaptureSession.cropCompositeImage (cognitive 21) Snapzy/Services/Capture/FrozenAreaCaptureSession.swift:228 — FrozenAreaCaptureSession.cropCompositeImage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (5 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · ScreenRecordingManager.makeContentFilter (cognitive 21) · ×1
  • ScreenRecordingManager.makeContentFilter (cognitive 21) Snapzy/Services/Capture/ScreenRecordingManager.swift:1957 — ScreenRecordingManager.makeContentFilter has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · SimpleTOMLParser.splitArray (cognitive 21) · ×1
  • SimpleTOMLParser.splitArray (cognitive 21) Snapzy/Services/Configuration/SimpleTOMLParser.swift:135 — SimpleTOMLParser.splitArray has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, loops 1 (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.
D2 · Cognitive Complexity · CaptureHistoryRetentionService.collectTempFilePathsForRecordsToDelete (cognitive 21) · ×1
  • CaptureHistoryRetentionService.collectTempFilePathsForRecordsToDelete (cognitive 21) Snapzy/Services/History/CaptureHistoryRetentionService.swift:116 — CaptureHistoryRetentionService.collectTempFilePathsForRecordsToDelete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 12). 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.
D2 · Cognitive Complexity · AnnotateSensitiveRedactionService.extractRegions (cognitive 21) · ×1
  • AnnotateSensitiveRedactionService.extractRegions (cognitive 21) Snapzy/Features/Annotate/Services/AnnotateSensitiveRedactionService.swift:354 — AnnotateSensitiveRedactionService.extractRegions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · CloudCredentialFormView.saveAndTest (cognitive 21) · ×1
  • CloudCredentialFormView.saveAndTest (cognitive 21) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:1272 — CloudCredentialFormView.saveAndTest has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10, error handling 3 (7 pts), if/else 2 (4 pts) (nesting depth added 6). 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.
D2 · Cognitive Complexity · QuickAccessDragMonitorView.continueTracking (cognitive 21) · ×1
  • QuickAccessDragMonitorView.continueTracking (cognitive 21) Snapzy/Features/QuickAccess/Components/QuickAccessDraggableView.swift:329 — QuickAccessDragMonitorView.continueTracking has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 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.
D2 · Cognitive Complexity · ScrollingCaptureStitcher.priorPenalty (cognitive 21) · ×1
  • ScrollingCaptureStitcher.priorPenalty (cognitive 21) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1293 — ScrollingCaptureStitcher.priorPenalty has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 2 (5 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.
D2 · Cognitive Complexity · AnnotateState.autoCropToContent (cognitive 20) · ×1
  • AnnotateState.autoCropToContent (cognitive 20) Snapzy/Features/Annotate/AnnotateState.swift:3120 — AnnotateState.autoCropToContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · AnnotateState.annotationPropertiesWillChange (cognitive 20) · ×1
  • AnnotateState.annotationPropertiesWillChange (cognitive 20) Snapzy/Features/Annotate/AnnotateState.swift:3838 — AnnotateState.annotationPropertiesWillChange has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 10. 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.
D2 · Cognitive Complexity · VideoEditorState.restoreSessionIfNeeded (cognitive 20) · ×1
  • VideoEditorState.restoreSessionIfNeeded (cognitive 20) Snapzy/Features/VideoEditor/VideoEditorState.swift:1091 — VideoEditorState.restoreSessionIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts) (nesting depth added 3). 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.
D2 · Cognitive Complexity · AreaSelectionOverlayView.renderManualSelection (cognitive 20) · ×1
  • AreaSelectionOverlayView.renderManualSelection (cognitive 20) Snapzy/Services/Capture/AreaSelectionWindow.swift:4215 — AreaSelectionOverlayView.renderManualSelection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · ScreenRecordingManager.stopRecording (cognitive 20) · ×1
  • ScreenRecordingManager.stopRecording (cognitive 20) Snapzy/Services/Capture/ScreenRecordingManager.swift:1255 — ScreenRecordingManager.stopRecording has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 pts), error handling 1 (3 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.
D2 · Cognitive Complexity · WindowSelectionQueryService.captureImmediateQuickLookCaptures (cognitive 20) · ×1
  • WindowSelectionQueryService.captureImmediateQuickLookCaptures (cognitive 20) Snapzy/Services/Capture/WindowSelectionQueryService.swift:266 — WindowSelectionQueryService.captureImmediateQuickLookCaptures has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (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.
D2 · Cognitive Complexity · AnnotateBottomBarView.annotateActionButtons (cognitive 20) · ×1
  • AnnotateBottomBarView.annotateActionButtons (cognitive 20) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:392 — AnnotateBottomBarView.annotateActionButtons has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 5, if/else 3 (4 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.
D2 · Cognitive Complexity · AnnotateWindowController.performCloudReUploadCopyAndClose (cognitive 20) · ×1
  • AnnotateWindowController.performCloudReUploadCopyAndClose (cognitive 20) Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1335 — AnnotateWindowController.performCloudReUploadCopyAndClose has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (4 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.
D2 · Cognitive Complexity · CloudSettingsView.configuredView (cognitive 20) · ×1
  • CloudSettingsView.configuredView (cognitive 20) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:172 — CloudSettingsView.configuredView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, ternaries 1 (3 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.
D2 · Cognitive Complexity · VideoEditorSessionStore.persistWrite (cognitive 20) · ×1
  • VideoEditorSessionStore.persistWrite (cognitive 20) Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:329 — VideoEditorSessionStore.persistWrite has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · ScrollingCaptureAutoScrollController.handleCommitResult (cognitive 20) · ×1
  • ScrollingCaptureAutoScrollController.handleCommitResult (cognitive 20) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureAutoScrollController.swift:233 — ScrollingCaptureAutoScrollController.handleCommitResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 pts), boolean chains 2, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · ScrollingCaptureCoordinator.startLiveRefreshLoopIfNeeded (cognitive 20) · ×1
  • ScrollingCaptureCoordinator.startLiveRefreshLoopIfNeeded (cognitive 20) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:1358 — ScrollingCaptureCoordinator.startLiveRefreshLoopIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 1 (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.
D2 · Cognitive Complexity · AnnotateTextSnapping.resolve (cognitive 19) · ×1
  • AnnotateTextSnapping.resolve (cognitive 19) Snapzy/Features/Annotate/AnnotateTextSnapping.swift:59 — AnnotateTextSnapping.resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (6 pts), boolean chains 4, loops 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.
D2 · Cognitive Complexity · CombineSnapping.resolve (cognitive 19) · ×1
  • CombineSnapping.resolve (cognitive 19) Snapzy/Features/Annotate/CombineSnapping.swift:5 — CombineSnapping.resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · TempCaptureManager.cleanupOrphanedFiles (cognitive 19) · ×1
  • TempCaptureManager.cleanupOrphanedFiles (cognitive 19) Snapzy/Services/Capture/TempCaptureManager.swift:272 — TempCaptureManager.cleanupOrphanedFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (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.
D2 · Cognitive Complexity · ClipboardHelper.writeSingleImageItem (cognitive 19) · ×1
  • ClipboardHelper.writeSingleImageItem (cognitive 19) Snapzy/Services/Clipboard/ClipboardHelper.swift:270 — ClipboardHelper.writeSingleImageItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 2 (4 pts) (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.
D2 · Cognitive Complexity · MockupExportViewForAnnotate.backgroundLayer (cognitive 19) · ×1
  • MockupExportViewForAnnotate.backgroundLayer (cognitive 19) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:1203 — MockupExportViewForAnnotate.backgroundLayer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 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.
D2 · Cognitive Complexity · ShortcutsView.body (cognitive 19) · ×1
  • ShortcutsView.body (cognitive 19) Snapzy/Features/Onboarding/Components/OnboardingShortcutsView.swift:22 — ShortcutsView.body has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 4 (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.
D2 · Cognitive Complexity · VideoEditorBottomBar.body (cognitive 19) · ×1
  • VideoEditorBottomBar.body (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift:34 — VideoEditorBottomBar.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (7 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · VideoEditorClipStripView.bodyGesture (cognitive 19) · ×1
  • VideoEditorClipStripView.bodyGesture (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorClipStripView.swift:405 — VideoEditorClipStripView.bodyGesture has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · SpeedTimelineTrack.interactionSegment (cognitive 19) · ×1
  • SpeedTimelineTrack.interactionSegment (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:527 — SpeedTimelineTrack.interactionSegment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (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.
D2 · Cognitive Complexity · ZoomTimelineTrack.interactionSegment (cognitive 19) · ×1
  • ZoomTimelineTrack.interactionSegment (cognitive 19) Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:498 — ZoomTimelineTrack.interactionSegment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (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.
D2 · Cognitive Complexity · HistoryWindow.performKeyEquivalent (cognitive 18) · ×1
  • HistoryWindow.performKeyEquivalent (cognitive 18) Snapzy/Features/History/HistoryWindowController.swift:19 — HistoryWindow.performKeyEquivalent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · VideoEditorState.recalculateEstimatedFileSize (cognitive 18) · ×1
  • VideoEditorState.recalculateEstimatedFileSize (cognitive 18) Snapzy/Features/VideoEditor/VideoEditorState.swift:2890 — VideoEditorState.recalculateEstimatedFileSize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · ScreenCaptureManager.scanTransparentFringeBounds (cognitive 18) · ×1
  • ScreenCaptureManager.scanTransparentFringeBounds (cognitive 18) Snapzy/Services/Capture/ScreenCaptureManager.swift:2294 — ScreenCaptureManager.scanTransparentFringeBounds has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 6 (nesting depth added 2). 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.
D2 · Cognitive Complexity · ScreenRecordingManager.logRecordingFrameDiagnostics (cognitive 18) · ×1
  • ScreenRecordingManager.logRecordingFrameDiagnostics (cognitive 18) Snapzy/Services/Capture/ScreenRecordingManager.swift:2116 — ScreenRecordingManager.logRecordingFrameDiagnostics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, ternaries 1 (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.
D2 · Cognitive Complexity · CaptureHistoryStore.remove (cognitive 18) · ×1
  • CaptureHistoryStore.remove (cognitive 18) Snapzy/Services/History/CaptureHistoryStore.swift:142 — CaptureHistoryStore.remove has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 2 (4 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.
D2 · Cognitive Complexity · DrawingCanvasNSView.updateCursor (cognitive 18) · ×1
  • DrawingCanvasNSView.updateCursor (cognitive 18) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2116 — DrawingCanvasNSView.updateCursor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · AnnotateCanvasView.canvasContent (cognitive 18) · ×1
  • AnnotateCanvasView.canvasContent (cognitive 18) Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:224 — AnnotateCanvasView.canvasContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 4, boolean chains 2 (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.
D2 · Cognitive Complexity · AnnotateWindowController.performCloudReUploadAndClose (cognitive 18) · ×1
  • AnnotateWindowController.performCloudReUploadAndClose (cognitive 18) Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1241 — AnnotateWindowController.performCloudReUploadAndClose has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (4 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · QuickAccessPinWindow.updateMousePassthrough (cognitive 18) · ×1
  • QuickAccessPinWindow.updateMousePassthrough (cognitive 18) Snapzy/Features/QuickAccess/Managers/QuickAccessPinWindow.swift:188 — QuickAccessPinWindow.updateMousePassthrough has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3 (nesting depth added 8). 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.
D2 · Cognitive Complexity · ThumbnailGenerator.generateFromImage (cognitive 18) · ×1
  • ThumbnailGenerator.generateFromImage (cognitive 18) Snapzy/Features/QuickAccess/Services/QuickAccessThumbnailGenerator.swift:93 — ThumbnailGenerator.generateFromImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 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.
D2 · Cognitive Complexity · VerticalCJKTextNormalizer.rowBands (cognitive 18) · ×1
  • VerticalCJKTextNormalizer.rowBands (cognitive 18) Snapzy/Services/Media/OCR/VerticalCJKTextNormalizer.swift:57 — VerticalCJKTextNormalizer.rowBands has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 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.
D2 · Cognitive Complexity · LiquidGlassBarSegment.body (cognitive 18) · ×1
  • LiquidGlassBarSegment.body (cognitive 18) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassActionBar.swift:85 — LiquidGlassBarSegment.body has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (6 pts), if/else 4 (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.
D2 · Cognitive Complexity · LiquidGlassButtonSurface.currentSubstrate (cognitive 18) · ×1
  • LiquidGlassButtonSurface.currentSubstrate (cognitive 18) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift:99 — LiquidGlassButtonSurface.currentSubstrate has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 1, match/switch 1 (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. This shape REPEATS in the file: one other method here (LiquidGlassButtonSurface.currentTint) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LiquidGlassButtonSurface.currentTint (cognitive 18) · ×1
  • LiquidGlassButtonSurface.currentTint (cognitive 18) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassButtonSurface.swift:114 — LiquidGlassButtonSurface.currentTint has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 1, match/switch 1 (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. This shape REPEATS in the file: one other method here (LiquidGlassButtonSurface.currentSubstrate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AppDelegate.ensureSandboxOffDataMigrationReadyForLaunch (cognitive 17) · ×1
  • AppDelegate.ensureSandboxOffDataMigrationReadyForLaunch (cognitive 17) Snapzy/App/SnapzyApp.swift:158 — AppDelegate.ensureSandboxOffDataMigrationReadyForLaunch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (7 pts), error handling 2 (6 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · AnnotateState.setTextPresentation (cognitive 17) · ×1
  • AnnotateState.setTextPresentation (cognitive 17) Snapzy/Features/Annotate/AnnotateState.swift:5034 — AnnotateState.setTextPresentation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · RecordingSession.logAudioSampleFormatIfNeeded (cognitive 17) · ×1
  • RecordingSession.logAudioSampleFormatIfNeeded (cognitive 17) Snapzy/Features/Recording/RecordingSession.swift:451 — RecordingSession.logAudioSampleFormatIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, match/switch 1 (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.
D2 · Cognitive Complexity · AreaSelectionController.scheduleRetainedMenuBarPopoverVisibilityRefresh (cognitive 17) · ×1
  • AreaSelectionController.scheduleRetainedMenuBarPopoverVisibilityRefresh (cognitive 17) Snapzy/Services/Capture/AreaSelectionWindow.swift:992 — AreaSelectionController.scheduleRetainedMenuBarPopoverVisibilityRefresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 pts) (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.
D2 · Cognitive Complexity · AreaSelectionController.handleLivePassthroughButton (cognitive 17) · ×1
  • AreaSelectionController.handleLivePassthroughButton (cognitive 17) Snapzy/Services/Capture/AreaSelectionWindow.swift:1894 — AreaSelectionController.handleLivePassthroughButton has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · ScreenCaptureManager.captureDisplaySnapshotsCore (cognitive 17) · ×1
  • ScreenCaptureManager.captureDisplaySnapshotsCore (cognitive 17) Snapzy/Services/Capture/ScreenCaptureManager.swift:430 — ScreenCaptureManager.captureDisplaySnapshotsCore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · ArrowGeometry.taperedArrowPath (cognitive 17) · ×1
  • ArrowGeometry.taperedArrowPath (cognitive 17) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:680 — ArrowGeometry.taperedArrowPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5, boolean chains 1 (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.
D2 · Cognitive Complexity · BlurEffectRenderer.drawCIFilterRegion (cognitive 17) · ×1
  • BlurEffectRenderer.drawCIFilterRegion (cognitive 17) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:415 — BlurEffectRenderer.drawCIFilterRegion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · SnapzyOnboardingBarSegment.body (cognitive 17) · ×1
  • SnapzyOnboardingBarSegment.body (cognitive 17) Snapzy/Features/Onboarding/Components/SnapzyOnboardingActionBar.swift:96 — SnapzyOnboardingBarSegment.body has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 3 (4 pts) (nesting depth added 1). 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.
D2 · Cognitive Complexity · ScrollingCaptureCoordinator.finish (cognitive 17) · ×1
  • ScrollingCaptureCoordinator.finish (cognitive 17) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureCoordinator.swift:600 — ScrollingCaptureCoordinator.finish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, match/switch 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.
D2 · Cognitive Complexity · InlineAreaControlGeometry.splitControlSides (cognitive 16) · ×1
  • InlineAreaControlGeometry.splitControlSides (cognitive 16) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:1402 — InlineAreaControlGeometry.splitControlSides has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.prepareInlineAreaAnnotateFrozenSession (cognitive 16) · ×1
  • ScreenCaptureViewModel.prepareInlineAreaAnnotateFrozenSession (cognitive 16) Snapzy/Features/Capture/CaptureViewModel.swift:974 — ScreenCaptureViewModel.prepareInlineAreaAnnotateFrozenSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (4 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.
D2 · Cognitive Complexity · ScreenCaptureViewModel.captureObjectCutout (cognitive 16) · ×1
  • ScreenCaptureViewModel.captureObjectCutout (cognitive 16) Snapzy/Features/Capture/CaptureViewModel.swift:2696 — ScreenCaptureViewModel.captureObjectCutout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (3 pts), boolean chains 1, error handling 1, ternaries 1 (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.
D2 · Cognitive Complexity · SplashWindowController.showWindow (cognitive 16) · ×1
  • SplashWindowController.showWindow (cognitive 16) Snapzy/Features/Splash/SplashWindow.swift:119 — SplashWindowController.showWindow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 3. 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.
D2 · Cognitive Complexity · VideoEditorState.seekPlayerInternally (cognitive 16) · ×1
  • VideoEditorState.seekPlayerInternally (cognitive 16) Snapzy/Features/VideoEditor/VideoEditorState.swift:1599 — VideoEditorState.seekPlayerInternally has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · AreaSelectionController.recaptureBackdropsForLuma (cognitive 16) · ×1
  • AreaSelectionController.recaptureBackdropsForLuma (cognitive 16) Snapzy/Services/Capture/AreaSelectionWindow.swift:1341 — AreaSelectionController.recaptureBackdropsForLuma has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, error handling 1, loops 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.
D2 · Cognitive Complexity · PostCaptureActionHandler.handleScreenshotCaptures (cognitive 16) · ×1
  • PostCaptureActionHandler.handleScreenshotCaptures (cognitive 16) Snapzy/Services/Capture/PostCaptureActionHandler.swift:63 — PostCaptureActionHandler.handleScreenshotCaptures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · SnapzyConfigurationImporter.collectAnnotateTools (cognitive 16) · ×1
  • SnapzyConfigurationImporter.collectAnnotateTools (cognitive 16) Snapzy/Services/Configuration/SnapzyConfigurationImporter.swift:233 — SnapzyConfigurationImporter.collectAnnotateTools has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 5, loops 1 (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.
D2 · Cognitive Complexity · BlurEffectRenderer.drawGaussianRegion (cognitive 16) · ×1
  • BlurEffectRenderer.drawGaussianRegion (cognitive 16) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:266 — BlurEffectRenderer.drawGaussianRegion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · CloudSettingsView.cloudStatsSection (cognitive 16) · ×1
  • CloudSettingsView.cloudStatsSection (cognitive 16) Snapzy/Features/Preferences/Components/PreferencesCloudSettingsView.swift:392 — CloudSettingsView.cloudStatsSection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 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.
D2 · Cognitive Complexity · QuickAccessCardView.handleSwipeEnded (cognitive 16) · ×1
  • QuickAccessCardView.handleSwipeEnded (cognitive 16) Snapzy/Features/QuickAccess/Components/QuickAccessCardView.swift:293 — QuickAccessCardView.handleSwipeEnded has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2 (3 pts) (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.
D2 · Cognitive Complexity · RecordingRegionOverlayView.drawGuidance (cognitive 16) · ×1
  • RecordingRegionOverlayView.drawGuidance (cognitive 16) Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:802 — RecordingRegionOverlayView.drawGuidance has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 11, boolean chains 3, if/else 2. 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.
D2 · Cognitive Complexity · VideoEditorExporter.addAudioTracks (cognitive 16) · ×1
  • VideoEditorExporter.addAudioTracks (cognitive 16) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:732 — VideoEditorExporter.addAudioTracks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (5 pts), boolean chains 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.
D2 · Cognitive Complexity · ScrollingCaptureStitcher.isAmbiguous (cognitive 16) · ×1
  • ScrollingCaptureStitcher.isAmbiguous (cognitive 16) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:1443 — ScrollingCaptureStitcher.isAmbiguous has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (3 members, 17 shared lines) · ×1
  • Near-duplicate member family (3 members, 17 shared lines) Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:48 — Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:48-77 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:81-108 | Snapzy/Features/Onboarding/Components/SnapzyCurvedHintArrow.swift:112-139 — These 3 members are variants of one another: a block of 17 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 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (71 shared lines) · ×1
  • Near-duplicate member pair (71 shared lines) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:266 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:266-353 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:415-505 — These two members are variants of one another: 71 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 · Near-duplicate member pair (48 shared lines) · ×1
  • Near-duplicate member pair (48 shared lines) Snapzy/Features/Recording/RecordingCoordinator.swift:692 — Snapzy/Features/Recording/RecordingCoordinator.swift:692-823 | Snapzy/Features/Recording/RecordingCoordinator.swift:873-965 — These two members are variants of one another: 48 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 · Near-duplicate member pair (38 shared lines) · ×1
  • Near-duplicate member pair (38 shared lines) Snapzy/Shared/Extensions/View+CornerRadius.swift:26 — Snapzy/Shared/Extensions/View+CornerRadius.swift:26-87 | Snapzy/Features/Onboarding/DesignSystem/SnapzyUnevenRoundedRectangle.swift:38-103 — These two members are variants of one another: 38 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 · Near-duplicate member pair (31 shared lines) · ×1
  • Near-duplicate member pair (31 shared lines) Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2660 — Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2660-2692 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1250-1282 — These two members are variants of one another: 31 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 · Near-duplicate member pair (29 shared lines) · ×1
  • Near-duplicate member pair (29 shared lines) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2207 — Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2207-2260 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:374-427 — These two members are variants of one another: 29 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 · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:641 — Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:641-756 | Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:779-865 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1232 — Snapzy/Features/Annotate/Models/AnnotateAnnotationItem.swift:1232-1263 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:834-856 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (77 lines × 2) · ×1
  • Duplicated block (77 lines × 2) Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1242 — Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1242-1318 | Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1336-1412 — 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 `Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1242` 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1415` calls `copyImage` and `Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:1320` 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.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:700 — Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:700-756 | Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:801-857 — 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 `Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:700` 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, `Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:799` calls `blurEffectValue` and `Snapzy/Features/Annotate/Services/AnnotateAnnotationRenderer.swift:697` 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.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:749 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:749-798 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:130-179 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 121 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:749` 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.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:251 — Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:251-288 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift:90-128 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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 `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:251` 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.
D4 · Code Duplication · Duplicated block (36–38 lines × 2) · ×1
  • Duplicated block (36–38 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:485 — Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:485-520 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift:180-217 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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.
D4 · Code Duplication · Duplicated block (33–38 lines × 2) · ×1
  • Duplicated block (33–38 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:216 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:216-248 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:179-216 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:216` 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.
D4 · Code Duplication · Duplicated block (33–36 lines × 2) · ×1
  • Duplicated block (33–36 lines × 2) Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:676 — Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:676-708 | Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift:52-87 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorSidebarComponents.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 121 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 `Snapzy/Features/Annotate/Components/AnnotateSidebarView.swift:676` 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.
D4 · Code Duplication · Duplicated block (35–36 lines × 2) · ×1
  • Duplicated block (35–36 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:443 — Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:443-477 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift:141-176 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 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 `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:443` 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 `spacing` to `6` in one and `4` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Snapzy/Features/VideoEditor/Components/VideoEditorLeftSidebar.swift:479` calls `Text`, `font`, `system` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomSettingsPopover.swift:177` 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.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) Snapzy/Features/Annotate/Components/AnnotateMockupCanvasView.swift:40 — Snapzy/Features/Annotate/Components/AnnotateMockupCanvasView.swift:40-74 | Snapzy/Features/Annotate/Services/AnnotateMockupExporter.swift:157-191 — 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 · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:896 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:896-929 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:2306-2339 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:896` 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.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:627 — Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift:627-659 | Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift:163-195 — before extracting anything, compare `Snapzy/Features/Annotate/Components/AnnotateBottomBarView.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorBottomBar.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 89 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.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) Snapzy/Features/History/Components/HistoryCardView.swift:51 — Snapzy/Features/History/Components/HistoryCardView.swift:51-82 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:59-90 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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 `Snapzy/Features/History/Components/HistoryCardView.swift:51` 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.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) Snapzy/Features/QuickAccess/QuickAccessManager.swift:260 — Snapzy/Features/QuickAccess/QuickAccessManager.swift:260-289 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:335-364 — 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. 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.
D4 · Code Duplication · Duplicated block (28–30 lines × 2) · ×1
  • Duplicated block (28–30 lines × 2) Snapzy/Features/Annotate/Components/AnnotateMockupPresetBar.swift:73 — Snapzy/Features/Annotate/Components/AnnotateMockupPresetBar.swift:73-102 | Snapzy/Features/Annotate/Components/AnnotateMockupPresetBarInline.swift:67-94 — 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.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) Snapzy/Features/Annotate/AnnotateState.swift:2265 — Snapzy/Features/Annotate/AnnotateState.swift:2265-2293 | Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:343-370 — 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 `Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:343` 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.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:325 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:325-353 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:477-505 — 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 `Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:325` 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.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:307 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:307-333 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:448-475 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:307` 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, `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:334` calls `restoreGraphicsState` and `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:476` 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.
D4 · Code Duplication · Duplicated block (24–27 lines × 2) · ×1
  • Duplicated block (24–27 lines × 2) Snapzy/Features/Recording/RecordingCoordinator.swift:765 — Snapzy/Features/Recording/RecordingCoordinator.swift:765-791 | Snapzy/Features/Recording/RecordingCoordinator.swift:919-942 — 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 `Snapzy/Features/Recording/RecordingCoordinator.swift:765` 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, `Snapzy/Features/Recording/RecordingCoordinator.swift:794` calls `setupClickHighlightOverlay`, `setupKeystrokeOverlay` and `Snapzy/Features/Recording/RecordingCoordinator.swift:943` 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.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:137 — Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:137-161 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassWindowBackdrop.swift:20-46 — 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 `Snapzy/Features/Onboarding/DesignSystem/SnapzyGlassSurface.swift:137` 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.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Snapzy/Services/Capture/AreaSelectionWindow.swift:4013 — Snapzy/Services/Capture/AreaSelectionWindow.swift:4013-4037 | Snapzy/Services/Capture/AreaSelectionWindow.swift:4067-4091 — 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 `Snapzy/Services/Capture/AreaSelectionWindow.swift:4013` 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.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) Snapzy/Services/Capture/WindowSelectionQueryService.swift:210 — Snapzy/Services/Capture/WindowSelectionQueryService.swift:210-232 | Snapzy/Services/Capture/WindowSelectionQueryService.swift:277-296 — 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 `Snapzy/Services/Capture/WindowSelectionQueryService.swift:210` 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.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:148 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:148-170 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:199-221 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:148` 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.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:238 — Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:238-258 | scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-support.swift:144-162 — 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 `scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-support.swift:144` 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:78 — Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:78-98 | Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:188-208 — 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 `Snapzy/Features/Annotate/Managers/AnnotateWindowController.swift:78` 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) Snapzy/Features/Annotate/Services/AnnotateExporter.swift:347 — Snapzy/Features/Annotate/Services/AnnotateExporter.swift:347-366 | Snapzy/Features/Annotate/Services/AnnotateExporter.swift:529-549 — 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 `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:347` 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, `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:345` calls `CGRect`, `drawCanvasShadow` and `Snapzy/Features/Annotate/Services/AnnotateExporter.swift:529` 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) Snapzy/Features/QuickAccess/QuickAccessManager.swift:901 — Snapzy/Features/QuickAccess/QuickAccessManager.swift:901-920 | Snapzy/Features/QuickAccess/Services/QuickAccessThumbnailGenerator.swift:119-137 | Snapzy/Features/QuickAccess/Services/QuickAccessThumbnailGenerator.swift:188-207 — 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 `Snapzy/Features/QuickAccess/QuickAccessManager.swift:901` 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:2376 — Snapzy/Features/Capture/CaptureViewModel.swift:2376-2395 | Snapzy/Features/Capture/CaptureViewModel.swift:2730-2748 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:2376` 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.
D4 · Code Duplication · Duplicated block (11–20 lines × 2) · ×1
  • Duplicated block (11–20 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:501 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:501-511 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:463-482 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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.
D4 · Code Duplication · Duplicated block (17–19 lines × 3) · ×1
  • Duplicated block (17–19 lines × 3) Snapzy/Services/Capture/ScreenCaptureManager.swift:2258 — Snapzy/Services/Capture/ScreenCaptureManager.swift:2258-2274 | Snapzy/Services/Capture/ScrollingCapture/ScrollingCaptureStitcher.swift:89-107 | Snapzy/Services/Media/ForegroundCutoutService.swift:281-298 — 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 `Snapzy/Services/Capture/ScreenCaptureManager.swift:2258` 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:656 — Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:656-674 | Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:557-575 — before extracting anything, compare `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift` and `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 192 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 `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:656` 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, `Snapzy/Features/VideoEditor/Components/VideoEditorZoomTimelineTrack.swift:576` calls `offset` and `Snapzy/Features/VideoEditor/Components/VideoEditorSpeedTimelineTrack.swift:675` 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.
D4 · Code Duplication · Duplicated block (17–18 lines × 3) · ×1
  • Duplicated block (17–18 lines × 3) Snapzy/Features/Capture/CaptureViewModel.swift:662 — Snapzy/Features/Capture/CaptureViewModel.swift:662-679 | Snapzy/Features/Capture/CaptureViewModel.swift:839-855 | Snapzy/Features/Capture/CaptureViewModel.swift:2711-2728 — 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.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) Snapzy/Features/Capture/CaptureViewModel.swift:1220 — Snapzy/Features/Capture/CaptureViewModel.swift:1220-1235 | Snapzy/Features/Capture/CaptureViewModel.swift:1259-1276 — 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 `Snapzy/Features/Capture/CaptureViewModel.swift:1220` 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.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1308 — Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1308-1322 | Snapzy/Shared/Components/ShortcutRecorderView.swift:131-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. Read the line range as the matched WINDOW rather than a finished unit: at `Snapzy/Features/Preferences/Components/PreferencesShortcutsSettingsView.swift:1308` 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.
D4 · Code Duplication · Duplicated block (11–18 lines × 2) · ×1
  • Duplicated block (11–18 lines × 2) Snapzy/Features/QuickAccess/Models/QuickAccessActionKind.swift:148 — Snapzy/Features/QuickAccess/Models/QuickAccessActionKind.swift:148-165 | Snapzy/Services/Configuration/SnapzyConfigurationShortcutsExporter.swift:174-184 — 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 · Duplicated block (2–17 lines × 3) · ×1
  • Duplicated block (2–17 lines × 3) Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:474 — Snapzy/Services/Cloud/GoogleDriveCloudProvider.swift:474-475 | Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:141-157 | Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:562-578 — 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 `Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:141` 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, `Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:581` calls `signingFailed` and `Snapzy/Services/Cloud/GoogleDriveOAuthService.swift:159` 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) Snapzy/Services/Configuration/SimpleTOMLParser.swift:77 — Snapzy/Services/Configuration/SimpleTOMLParser.swift:77-93 | Snapzy/Services/Configuration/SimpleTOMLParser.swift:142-157 — 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 `Snapzy/Services/Configuration/SimpleTOMLParser.swift:77` 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.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:606 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:606-621 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:701-716 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:940-955 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:1013-1028 — 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 `Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:606` 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.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) Snapzy/Features/Preferences/PreferencesWindowController.swift:125 — Snapzy/Features/Preferences/PreferencesWindowController.swift:125-140 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPlaygroundWindowController.swift:74-87 — 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 · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) Snapzy/Features/Recording/Components/RecordingAnnotationToolbarContentBuilder.swift:43 — Snapzy/Features/Recording/Components/RecordingAnnotationToolbarContentBuilder.swift:43-55 | Snapzy/Features/Recording/RecordingToolbarWindow.swift:520-535 — 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 · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:716 — Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:716-730 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:829-843 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:955-969 | Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:1028-1042 — 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 `Snapzy/Features/Annotate/Services/AnnotateBlurEffectRenderer.swift:716` 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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) Snapzy/Services/Cloud/S3CloudProvider.swift:185 — Snapzy/Services/Cloud/S3CloudProvider.swift:185-199 | Snapzy/Services/Cloud/S3CloudProvider.swift:255-269 | Snapzy/Services/Cloud/S3CloudProvider.swift:344-358 — 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.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) Snapzy/Features/QuickAccess/QuickAccessManager.swift:294 — Snapzy/Features/QuickAccess/QuickAccessManager.swift:294-307 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:370-383 | Snapzy/Features/QuickAccess/QuickAccessManager.swift:1444-1457 — 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.
D4 · Code Duplication · Duplicated block (9–14 lines × 4) · ×1
  • Duplicated block (9–14 lines × 4) scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:92 — scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:92-105 | scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:106-119 | scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:120-128 | scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:134-146 — 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 `scripts/swift-tools/scrolling-capture-accuracy/scrolling-capture-accuracy-benchmark.swift:92` 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) scripts/swift-tools/ocr/ocr-readme-benchmark.swift:193 — scripts/swift-tools/ocr/ocr-readme-benchmark.swift:193-205 | scripts/swift-tools/ocr/ocr-readme-benchmark.swift:207-220 — 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 `scripts/swift-tools/ocr/ocr-readme-benchmark.swift:193` 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:245 — Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:245-258 | Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:276-287 — 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 `Snapzy/Features/Annotate/Components/AnnotateCanvasView.swift:245` 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) Snapzy/Features/Preferences/PreferencesView.swift:184 — Snapzy/Features/Preferences/PreferencesView.swift:184-195 | Snapzy/Features/Preferences/PreferencesWindowController.swift:69-81 — 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 `Snapzy/Features/Preferences/PreferencesView.swift:184` 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.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) Snapzy/Services/Capture/ScreenRecordingManager.swift:1380 — Snapzy/Services/Capture/ScreenRecordingManager.swift:1380-1389 | Snapzy/Services/Capture/TempCaptureManager.swift:153-165 — 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 `Snapzy/Services/Capture/ScreenRecordingManager.swift:1380` 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.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) Snapzy/Features/Annotate/Services/AnnotationSessionStore.swift:299 — Snapzy/Features/Annotate/Services/AnnotationSessionStore.swift:299-307 | Snapzy/Features/VideoEditor/Services/VideoEditorSessionStore.swift:388-399 — 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 `Snapzy/Features/Annotate/Services/AnnotationSessionStore.swift:299` 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.
D4 · Code Duplication · Duplicated block (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) Snapzy/Features/VideoEditor/Services/VideoEditorZoomCompositor.swift:372 — Snapzy/Features/VideoEditor/Services/VideoEditorZoomCompositor.swift:372-379 | Snapzy/Features/VideoEditor/Services/VideoEditorZoomCompositor.swift:623-634 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:153 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:153-163 | Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:384-394 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:204-214 | Snapzy/Features/Onboarding/Mockups/SnapzyMockQuickAccessView.swift:350-360 | Snapzy/Features/Onboarding/Mockups/SnapzyMockShortcutsView.swift:74-84 — 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 `Snapzy/Features/Onboarding/Mockups/SnapzyMockAreaCaptureView.swift:153` 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:99 — Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:99-109 | Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:597-605 — 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 `Snapzy/Features/VideoEditor/Services/VideoEditorExporter.swift:99` 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.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) Snapzy/Features/History/Components/HistoryCardView.swift:167 — Snapzy/Features/History/Components/HistoryCardView.swift:167-176 | Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:161-170 | Snapzy/Features/History/Components/HistoryToolbar.swift:122-131 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:515-524 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:909-918 — before extracting anything, compare `Snapzy/Features/History/Components/HistoryCardView.swift` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 110 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Snapzy/Features/History/Components/HistoryCardView.swift:163` calls `rect` and `Snapzy/Features/History/Components/HistoryExpandedCaptureCardView.swift:160` 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.
D4 · Code Duplication · Duplicated block (4–10 lines × 5) · ×1
  • Duplicated block (4–10 lines × 5) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2212 — Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2212-2221 | Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2236-2239 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:1644-1651 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:379-388 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:403-406 — 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 `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2212` 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) Snapzy/Features/Annotate/AnnotateState.swift:3681 — Snapzy/Features/Annotate/AnnotateState.swift:3681-3689 | Snapzy/Features/Annotate/AnnotateState.swift:3840-3849 — 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. 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.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1477 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1477-1483 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1743-1751 — 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 `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1477` 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 `spacing` to `10` in one and `0` 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) Snapzy/Features/History/Managers/HistoryFloatingPanelController.swift:250 — Snapzy/Features/History/Managers/HistoryFloatingPanelController.swift:250-257 | Snapzy/Features/Preferences/Components/PreferencesCloudUploadHistoryView.swift:54-61 | Snapzy/Features/Recording/Components/RecordingAnnotationToolbarContentBuilder.swift:46-52 | Snapzy/Features/Recording/RecordingToolbarWindow.swift:525-531 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1443 — Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1443-1450 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1570-1577 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1597-1604 | Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1651-1658 — 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 `Snapzy/Features/Annotate/Components/AnnotateQuickPropertiesBar.swift:1443` 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) Snapzy/Features/VideoEditor/VideoEditorState.swift:297 — Snapzy/Features/VideoEditor/VideoEditorState.swift:297-304 | Snapzy/Features/VideoEditor/VideoEditorState.swift:3291-3297 — 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 `Snapzy/Features/VideoEditor/VideoEditorState.swift:3291` 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.
D4 · Code Duplication · Duplicated block (2–7 lines × 5) · ×1
  • Duplicated block (2–7 lines × 5) Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:55 — Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.swift:55-57 | Snapzy/Features/Onboarding/Mockups/SnapzyMockFinderWindow.swift:64-65 | Snapzy/Features/Onboarding/Mockups/SnapzyMockNotesWindow.swift:23-24 | Snapzy/Features/Onboarding/Mockups/SnapzyMockSystemSettingsWindow.swift:55-61 | Snapzy/Features/Onboarding/Mockups/SnapzyMockVideoEditorWindow.swift:79-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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Snapzy/Features/Onboarding/Mockups/SnapzyMockAnnotateWindow.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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `6` in one and `5` 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.
D4 · Code Duplication · Duplicated block (4–6 lines × 5) · ×1
  • Duplicated block (4–6 lines × 5) Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2229 — Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2229-2234 | Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2243-2246 | Snapzy/Features/Annotate/InlineAreaAnnotateWindow.swift:1656-1659 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:396-401 | Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:410-413 — 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 `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2229` 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, `Snapzy/Features/Recording/Managers/RecordingRegionOverlayWindow.swift:416` calls `withAlphaComponent`, `setStroke`, `stroke` and `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift:2249` 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.
D4 · Code Duplication · Duplicated block (5–6 lines × 3) · ×1
  • Duplicated block (5–6 lines × 3) Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1091 — Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1091-1096 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1099-1104 | Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1105-1109 — 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 `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1091` 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, `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1090` calls `frame`, `overlay`, `Text` and `Snapzy/Shared/DesignSystem/LiquidGlass/LiquidGlassPreview.swift:1105` 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.
Minor — 13 finding(s)
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no architecture or design documentation docs/DEVELOPMENT.md — The README for development tools (xcodebuild, build_and_run.sh) describes no architecture or design rationale; only a Prerequisites list and local-debugging steps are present. Add an Architecture section explaining the dual-path Ruru composite model that powers Liquid Glass, so readers can understand why this tooling exists.
  • Documentation: no architecture or design documentation docs/RECORDING.md — The recording runtime path is described but no architecture or media-pipeline diagram accompanies it. Add a short architecture sketch (or link to) the ScreenRecordingManager pipeline, showing trigger, pre-record toolbar, and output stages.
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate Snapzy/Shared/Localization/AppLanguageManager.swift:150 — `normalized.contains("hans") || normalized.hasPrefix("zh-cn") || normalized.hasPrefix("zh-sg")` appears character-identically in 2 files — Snapzy/Shared/Localization/AppLanguageManager.swift, scripts/swift-tools/ocr/ocr-readme-benchmark.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 Snapzy/Shared/Localization/AppLanguageManager.swift:146 — `normalized.contains("hant") || normalized.hasPrefix("zh-tw") || normalized.hasPrefix("zh-hk") || normalized.hasPrefix("zh-mo")` appears character-identically in 2 files — Snapzy/Shared/Localization/AppLanguageManager.swift, scripts/swift-tools/ocr/ocr-readme-benchmark.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.
D20 · ADR Quality · No ADRs found · ×1
  • 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/`.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 392 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 392 of the 519 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Snapzy/Services/Capture/ActiveWindowResolver.swift. 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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 53729 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.
P4 · Deployment & Rollback · No rollback/health safety · ×1
  • No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
Minor — 4 finding(s)
D12 · Dependency Hygiene · Outdated · ×4
  • Outdated: grdb.swift — `grdb.swift` is resolved at 7.10.0, but 7.11.1 is the newest release tagged on https://github.com/groue/GRDB.swift.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 grdb.swift` reaches this one with no change to Package.swift.
  • Outdated: libwebp-xcode — `libwebp-xcode` is resolved at 1.5.0, but 1.6.0 is the newest release tagged on https://github.com/SDWebImage/libwebp-Xcode.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 libwebp-xcode` reaches this one with no change to Package.swift.
  • Outdated: sparkle — `sparkle` is resolved at 2.8.1, but 2.10.0 is the newest release tagged on https://github.com/sparkle-project/Sparkle within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update sparkle` reaches this one with no change to Package.swift.
  • Outdated: swift-webp — `swift-webp` is resolved at 0.6.1, but 0.7.0 is the newest release tagged on https://github.com/ainame/Swift-WebP.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 swift-webp` 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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8dcb23b1047f4f74844124a6ed648d7c/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8dcb23b1047f4f74844124a6ed648d7c/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .12artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .0—
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—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 91 file(s) — `Snapzy/Features/Annotate/Components/AnnotateCanvasDrawingView.swift`, `Snapzy/Features/Annotate/Components/AnnotateDropZoneView.swift`, `Snapzy/Features/Annotate/Components/AnnotateMockupCanvasView.swift`, `Snapzy/Features/Annotate/Components/AnnotateMockupControlsSection.swift`, `Snapzy/Features/Annotate/Components/AnnotateMockupMainView.swift`, … (+86 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0—

Run 01a0f474-32a6-74c4-a106-b52c7094a031 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md