Commit 30b3be9ba5

30b3be9ba558d802adeb8fd2ef50b10442d462a6

parent: 9c41ef5269

Unsigned

cmc <hello@cleberg.net> · 2026-07-16 16:13 UTC

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.

Layout: unified · split

Hutch/Views/Patchsets/PatchsetDetailView.swift +1 −1
@@ -71,7 +71,7 @@ struct PatchsetDetailView: View {
71 Task { await viewModel.updateStatus(to: status) } 71 Task { await viewModel.updateStatus(to: status) }
72 } 72 }
73 } 73 }
74 Button("Cancel", role: .cancel) {} // dismisses the dialog; no action needed 74 Button("Cancel", role: .cancel) { /* dismisses the dialog; no action needed */ }
75 } 75 }
76 .alert( 76 .alert(
77 "Couldn't Update Patchset", 77 "Couldn't Update Patchset",
Hutch/Views/Tickets/TicketDetailView.swift +1 −1
@@ -204,7 +204,7 @@ struct TicketDetailView: View {
204 } 204 }
205 } 205 }
206 } 206 }
207 Button("Cancel", role: .cancel) {} // dismisses the dialog; no action needed 207 Button("Cancel", role: .cancel) { /* dismisses the dialog; no action needed */ }
208 } message: { 208 } message: {
209 Text("This permanently deletes the ticket and its comments. This cannot be undone.") 209 Text("This permanently deletes the ticket and its comments. This cannot be undone.")
210 } 210 }
HutchTests/APICacheTests.swift +1 −1
@@ -294,7 +294,7 @@ private final class CachedURLProtocol: URLProtocol, @unchecked Sendable {
294 } 294 }
295 } 295 }
296 296
297 override func stopLoading() {} // required override; nothing to tear down 297 override func stopLoading() { /* required override; nothing to tear down */ }
298 298
299 static func reset(responses: [CachedURLProtocolResponse], responseDelay: TimeInterval = 0) { 299 static func reset(responses: [CachedURLProtocolResponse], responseDelay: TimeInterval = 0) {
300 Self.responses = responses 300 Self.responses = responses