From bb18197860ffdb491f010648ec903003b6e1bb65 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 20 Jul 2026 16:22:28 -0500 Subject: v4.8.3: Clear SonarCloud new-code issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the 4 reported bugs and ~97 code smells flagged in the new-code period. No behavior changes. Bugs (swift:S3923) — DomainInspectionService's confidenceFor* helpers each returned `error == nil ? .low : .low`, an inert conditional. Simplified to `return .low` and dropped the now-unused `error` parameter. Smells: - Merged 14 identical `.empty`/`.error` switch branches in DomainViewModel - Consolidated duplicate implementations (clearPresentedResults/reset, String.nonEmpty/nilIfEmpty, ExportFormat.id/fileExtension) - Extracted nested ternaries into TLSGrade.tone, EmailSecurityGrade.tone, and ChangeImpactClassification.color; removed ContentView.impactColor and the duplicate mapping in BatchResultsView - Documented empty closures and singleton inits - Marked unused protocol-conformance parameters `_` - Renamed CloudSyncTrigger.`import` to `imported` (raw value preserved) and SSLSessionDelegate's _serverTrust/_tlsMetadata - Merged nested ifs in the DER parser; flattened closure nesting in PortScanService and IntegrationService - Replaced two-case switches with if/else Left open: S107 (init parameter counts), S115 (constants mirroring DoH and ipapi JSON keys), S1075 (false positives on https:// literals), and two S117 hits on SwiftUI $binding shorthand. These want a Won't Fix resolution in SonarCloud, not a code change. --- RELEASE_ROADMAP.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'RELEASE_ROADMAP.md') diff --git a/RELEASE_ROADMAP.md b/RELEASE_ROADMAP.md index c09639f..30158e7 100644 --- a/RELEASE_ROADMAP.md +++ b/RELEASE_ROADMAP.md @@ -6,7 +6,7 @@ ports, geolocation, subdomains, availability). The next several releases invest in *reach and surfacing* — getting that data onto more iOS surfaces and into more workflows — rather than adding raw protocol checks. -Current version: `v4.8.2`. +Current version: `v4.8.3`. ## v4.4.1 Patch: Release Readiness — ✅ shipped @@ -154,6 +154,37 @@ Goal: close the UAT follow-ups and make failures legible instead of silent. synced against App Store Connect. Registered in the project without target membership so it is not bundled into shipping builds. +## v4.8.3 Patch: Static Analysis Cleanup — ✅ shipped + +Goal: clear the SonarCloud new-code backlog without changing behavior. + +- **Dead confidence conditionals fixed** (4 bugs) — + `DomainInspectionService`'s `confidenceFor*` helpers each returned + `error == nil ? .low : .low`. The conditional was inert, so the unused `error` + parameter was dropped alongside it. +- **Identical switch branches merged** — 14 sites in `DomainViewModel` handled + `.empty(message)` and `.error(message)` with byte-identical bodies; they now + share one `case let .empty(message), let .error(message):`. +- **Duplicate implementations consolidated** — `clearPresentedResults()` now + delegates to `reset()`, `String.nonEmpty` was folded into `nilIfEmpty`, and + `ExportFormat.id` derives from `fileExtension`. +- **Nested ternaries extracted** — grade-to-tone and impact-to-color mappings + became `TLSGrade.tone`, `EmailSecurityGrade.tone`, and + `ChangeImpactClassification.color`, replacing `ContentView`'s private + `impactColor` and the duplicate mapping in `BatchResultsView`. +- **Remaining smells** — empty closures and singleton inits documented, unused + protocol-conformance parameters marked `_`, `CloudSyncTrigger.import` renamed + to `imported` (raw value preserved), `_serverTrust`/`_tlsMetadata` renamed, + nested `if`s merged in the DER parser, and deep closure nesting flattened in + `PortScanService` and `IntegrationService`. + +Left open deliberately: `swift:S107` (initializer parameter counts on model +memberwise inits), `swift:S115` (constants mirroring DoH/ipapi JSON keys), +`swift:S1075` (false positives on `https://` literals), and two `swift:S117` +hits on SwiftUI `$binding` shorthand in `AuditModeView`, which cannot be +renamed. These want a *Won't Fix* / *Safe* resolution in SonarCloud rather than +a code change. + ## v5.0.0 Major: Contract Stabilization & Engineering Health Goal: earn long-term compatibility promises — and pay down the debt that the -- cgit v1.2.3