summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-16 11:13:13 -0500
committerChristian Cleberg <[email protected]>2026-07-16 11:13:13 -0500
commitd73c6ac381baac0ae8b0d5dfc551165591115905 (patch)
tree4b2e65b5e3182d588fe3074cd0dc36e2adbe0dd5
parent3854761b48d893ac4b5d8d9c257dd3cbdc7214d6 (diff)
downloadhutch-d73c6ac381baac0ae8b0d5dfc551165591115905.tar.gz
hutch-d73c6ac381baac0ae8b0d5dfc551165591115905.tar.bz2
hutch-d73c6ac381baac0ae8b0d5dfc551165591115905.zip
fix: move the S1186 empty-block comments inside the braces
Trailing // comments after {} left the block lexically empty, so SonarCloud kept flagging stopLoading (and would have re-flagged the two Cancel buttons). S1186 wants a *nested* comment; use /* ... */ inside.
-rw-r--r--Hutch/Views/Patchsets/PatchsetDetailView.swift2
-rw-r--r--Hutch/Views/Tickets/TicketDetailView.swift2
-rw-r--r--HutchTests/APICacheTests.swift2
3 files changed, 3 insertions, 3 deletions
diff --git a/Hutch/Views/Patchsets/PatchsetDetailView.swift b/Hutch/Views/Patchsets/PatchsetDetailView.swift
index 91aa417..3ef5ff4 100644
--- a/Hutch/Views/Patchsets/PatchsetDetailView.swift
+++ b/Hutch/Views/Patchsets/PatchsetDetailView.swift
@@ -71,7 +71,7 @@ struct PatchsetDetailView: View {
Task { await viewModel.updateStatus(to: status) }
}
}
- Button("Cancel", role: .cancel) {} // dismisses the dialog; no action needed
+ Button("Cancel", role: .cancel) { /* dismisses the dialog; no action needed */ }
}
.alert(
"Couldn't Update Patchset",
diff --git a/Hutch/Views/Tickets/TicketDetailView.swift b/Hutch/Views/Tickets/TicketDetailView.swift
index 1705a73..6339776 100644
--- a/Hutch/Views/Tickets/TicketDetailView.swift
+++ b/Hutch/Views/Tickets/TicketDetailView.swift
@@ -204,7 +204,7 @@ struct TicketDetailView: View {
}
}
}
- Button("Cancel", role: .cancel) {} // dismisses the dialog; no action needed
+ Button("Cancel", role: .cancel) { /* dismisses the dialog; no action needed */ }
} message: {
Text("This permanently deletes the ticket and its comments. This cannot be undone.")
}
diff --git a/HutchTests/APICacheTests.swift b/HutchTests/APICacheTests.swift
index a03e6f9..24db870 100644
--- a/HutchTests/APICacheTests.swift
+++ b/HutchTests/APICacheTests.swift
@@ -294,7 +294,7 @@ private final class CachedURLProtocol: URLProtocol, @unchecked Sendable {
}
}
- override func stopLoading() {} // required override; nothing to tear down
+ override func stopLoading() { /* required override; nothing to tear down */ }
static func reset(responses: [CachedURLProtocolResponse], responseDelay: TimeInterval = 0) {
Self.responses = responses