From 7001577e6798530c943ac4cf03258bc172927a67 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 24 Jul 2026 22:58:44 -0500 Subject: chore: clear actionable SonarCloud smells (shell [[, merged if) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Scripts/audit-a11y.sh: replace `[ ... ]` with `[[ ... ]]` in the seven shell conditionals SonarCloud flagged (shelldre:S7688). The script is bash (`#!/usr/bin/env bash`), so `[[` is safe and avoids word-splitting/globbing footguns. The jq `[ .devices | ... ]` filter is untouched — it is not a shell test. - AccessibilityAuditHarness.swift: fold the nested `if` in the noise classifier into a single conditional (swift:S1066); behavior unchanged. The remaining open SonarCloud issues (S1075 https literals, S115 external-JSON CodingKeys, S107 parameter counts, S3087 callback nesting) are false positives or intentional and are being resolved as Won't Fix / Safe in SonarCloud, consistent with the v4.8.3 static-analysis policy in RELEASE_ROADMAP.md. --- DomainDigUITests/AccessibilityAuditHarness.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'DomainDigUITests') diff --git a/DomainDigUITests/AccessibilityAuditHarness.swift b/DomainDigUITests/AccessibilityAuditHarness.swift index 24f900e..58583e1 100644 --- a/DomainDigUITests/AccessibilityAuditHarness.swift +++ b/DomainDigUITests/AccessibilityAuditHarness.swift @@ -184,10 +184,10 @@ enum AccessibilityAuditHarness { // and the search field's hit region at accessibility sizes is the // system's own control. Reading `elementType` here is safe; reading // `frame` is not (it kills element attribution for the whole audit). - if let type = issue.element?.elementType, type == .searchField || type == .textField { - if issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { - return "system field placeholder/hit region, length-independent" - } + if let type = issue.element?.elementType, + type == .searchField || type == .textField, + issue.auditType.contains(.textClipped) || issue.auditType.contains(.hitRegion) { + return "system field placeholder/hit region, length-independent" } // Unattributed clipped-text/dynamic-type findings. Bisection showed the -- cgit v1.2.3