Commit 4e56233305

4e56233305011fa3a95b3e8fc5c6f53d27efd63c

parent: b17264940c

Unsigned

cmc <hello@cleberg.net> · 2026-03-24 21:39 UTC

fix: add nested comments to satisfy sonar rule swift:S1186

Layout: unified · split

Hutch.xcodeproj/project.pbxproj +4 −4
@@ -359,7 +359,7 @@
359 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 360 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
361 CODE_SIGN_STYLE = Automatic; 361 CODE_SIGN_STYLE = Automatic;
362 CURRENT_PROJECT_VERSION = 8; 362 CURRENT_PROJECT_VERSION = 9;
363 DEVELOPMENT_TEAM = ZCNAX3VL9D; 363 DEVELOPMENT_TEAM = ZCNAX3VL9D;
364 ENABLE_PREVIEWS = YES; 364 ENABLE_PREVIEWS = YES;
365 GENERATE_INFOPLIST_FILE = YES; 365 GENERATE_INFOPLIST_FILE = YES;
@@ -376,7 +376,7 @@
376 "$(inherited)", 376 "$(inherited)",
377 "@executable_path/Frameworks", 377 "@executable_path/Frameworks",
378 ); 378 );
379 MARKETING_VERSION = 2.3.0; 379 MARKETING_VERSION = 2.3.1;
380 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; 380 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch;
381 PRODUCT_NAME = "$(TARGET_NAME)"; 381 PRODUCT_NAME = "$(TARGET_NAME)";
382 STRING_CATALOG_GENERATE_SYMBOLS = YES; 382 STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -395,7 +395,7 @@
395 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 395 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
396 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 396 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
397 CODE_SIGN_STYLE = Automatic; 397 CODE_SIGN_STYLE = Automatic;
398 CURRENT_PROJECT_VERSION = 8; 398 CURRENT_PROJECT_VERSION = 9;
399 DEVELOPMENT_TEAM = ZCNAX3VL9D; 399 DEVELOPMENT_TEAM = ZCNAX3VL9D;
400 ENABLE_PREVIEWS = YES; 400 ENABLE_PREVIEWS = YES;
401 GENERATE_INFOPLIST_FILE = YES; 401 GENERATE_INFOPLIST_FILE = YES;
@@ -412,7 +412,7 @@
412 "$(inherited)", 412 "$(inherited)",
413 "@executable_path/Frameworks", 413 "@executable_path/Frameworks",
414 ); 414 );
415 MARKETING_VERSION = 2.3.0; 415 MARKETING_VERSION = 2.3.1;
416 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; 416 PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch;
417 PRODUCT_NAME = "$(TARGET_NAME)"; 417 PRODUCT_NAME = "$(TARGET_NAME)";
418 STRING_CATALOG_GENERATE_SYMBOLS = YES; 418 STRING_CATALOG_GENERATE_SYMBOLS = YES;
Hutch/Extensions/SRHTShareUI.swift +7 −2
@@ -40,7 +40,9 @@ struct SRHTShareButton<Label: View>: View {
40 } 40 }
41 } 41 }
42 .alert("Share Unavailable", isPresented: $isShowingFallbackAlert) { 42 .alert("Share Unavailable", isPresented: $isShowingFallbackAlert) {
43 Button("OK", role: .cancel) {} 43 Button("OK", role: .cancel) {
44 // Alert dismissal is implicit; no additional action required.
45 }
44 } message: { 46 } message: {
45 Text(target.fallbackMessage) 47 Text(target.fallbackMessage)
46 } 48 }
@@ -54,5 +56,8 @@ private struct ShareSheet: UIViewControllerRepresentable {
54 UIActivityViewController(activityItems: activityItems, applicationActivities: nil) 56 UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
55 } 57 }
56 58
57 func updateUIViewController(_ uiViewController: UIActivityViewController, context: Context) {} 59 func updateUIViewController(_ uiViewController: UIActivityViewController, context: Context) {
60 // UIActivityViewController is fully configured in makeUIViewController.
61 // No state-driven updates are required.
62 }
58} 63}
Hutch/Views/Builds/BuildDetailView.swift +3 −1
@@ -87,7 +87,9 @@ struct BuildDetailView: View {
87 } 87 }
88 } 88 }
89 .alert("Cancel Build?", isPresented: $showCancelConfirmation) { 89 .alert("Cancel Build?", isPresented: $showCancelConfirmation) {
90 Button("Keep Running", role: .cancel) {} 90 Button("Keep Running", role: .cancel) {
91 // Alert dismissal is implicit; no additional action required.
92 }
91 Button("Cancel Build", role: .destructive) { 93 Button("Cancel Build", role: .destructive) {
92 Task { await viewModel?.cancelJob() } 94 Task { await viewModel?.cancelJob() }
93 } 95 }
Hutch/Views/Inbox/ThreadDetailView.swift +4 −1
@@ -277,7 +277,10 @@ private struct MailComposeView: UIViewControllerRepresentable {
277 return controller 277 return controller
278 } 278 }
279 279
280 func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} 280 func updateUIViewController(_ uiViewController: UIViewController, context: Context) {
281 // The view controller is fully configured in makeUIViewController.
282 // No state-driven updates are required.
283 }
281 284
282 final class Coordinator: NSObject, MFMailComposeViewControllerDelegate { 285 final class Coordinator: NSObject, MFMailComposeViewControllerDelegate {
283 let onComplete: (Result) -> Void 286 let onComplete: (Result) -> Void
Hutch/Views/Pastes/PasteDetailView.swift +3 −1
@@ -63,7 +63,9 @@ struct PasteDetailView: View {
63 } 63 }
64 } 64 }
65 .alert("Delete Paste?", isPresented: $showDeleteConfirmation) { 65 .alert("Delete Paste?", isPresented: $showDeleteConfirmation) {
66 Button("Cancel", role: .cancel) {} 66 Button("Cancel", role: .cancel) {
67 // Alert dismissal is implicit; no additional action required.
68 }
67 Button("Delete", role: .destructive) { 69 Button("Delete", role: .destructive) {
68 Task { 70 Task {
69 if await viewModel?.deletePaste() == true { 71 if await viewModel?.deletePaste() == true {
Hutch/Views/Repositories/HgRepositorySettingsView.swift +10 −3
@@ -55,7 +55,9 @@ struct HgRepositorySettingsView: View {
55 "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?", 55 "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?",
56 isPresented: $showDeleteConfirmation 56 isPresented: $showDeleteConfirmation
57 ) { 57 ) {
58 Button("Cancel", role: .cancel) {} 58 Button("Cancel", role: .cancel) {
59 // Alert dismissal is implicit; no additional action required.
60 }
59 Button("Delete", role: .destructive) { 61 Button("Delete", role: .destructive) {
60 Task { 62 Task {
61 await viewModel.deleteRepository() 63 await viewModel.deleteRepository()
@@ -76,7 +78,9 @@ struct HgRepositorySettingsView: View {
76 } 78 }
77 } 79 }
78 )) { 80 )) {
79 Button("Cancel", role: .cancel) {} 81 Button("Cancel", role: .cancel) {
82 // Alert dismissal is implicit; no additional action required.
83 }
80 Button("Remove Access", role: .destructive) { 84 Button("Remove Access", role: .destructive) {
81 guard let entry = pendingACLDeletion else { return } 85 guard let entry = pendingACLDeletion else { return }
82 Task { 86 Task {
@@ -234,7 +238,10 @@ struct HgRepositorySettingsView: View {
234 .font(.caption) 238 .font(.caption)
235 .foregroundStyle(.secondary) 239 .foregroundStyle(.secondary)
236 240
237 Button("Remove Revision", role: .destructive) {} 241 Button("Remove Revision", role: .destructive) {
242 // Not implemented: the hg.sr.ht API does not expose a histedit endpoint.
243 // This button is disabled until the API supports revision removal.
244 }
238 .disabled(true) 245 .disabled(true)
239 } 246 }
240 } 247 }
Hutch/Views/Repositories/RepositorySettingsView.swift +6 −2
@@ -58,7 +58,9 @@ struct RepositorySettingsView: View {
58 "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?", 58 "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?",
59 isPresented: $showDeleteConfirmation 59 isPresented: $showDeleteConfirmation
60 ) { 60 ) {
61 Button("Cancel", role: .cancel) {} 61 Button("Cancel", role: .cancel) {
62 // Alert dismissal is implicit; no additional action required.
63 }
62 Button("Delete", role: .destructive) { 64 Button("Delete", role: .destructive) {
63 Task { 65 Task {
64 await viewModel.deleteRepository() 66 await viewModel.deleteRepository()
@@ -79,7 +81,9 @@ struct RepositorySettingsView: View {
79 } 81 }
80 } 82 }
81 )) { 83 )) {
82 Button("Cancel", role: .cancel) {} 84 Button("Cancel", role: .cancel) {
85 // Alert dismissal is implicit; no additional action required.
86 }
83 Button("Remove Access", role: .destructive) { 87 Button("Remove Access", role: .destructive) {
84 guard let entry = pendingACLDeletion else { return } 88 guard let entry = pendingACLDeletion else { return }
85 Task { 89 Task {
Hutch/Views/Settings/SettingsView.swift +6 −2
@@ -99,7 +99,9 @@ struct SettingsView: View {
99 } 99 }
100 ) 100 )
101 ) { 101 ) {
102 Button("Cancel", role: .cancel) {} 102 Button("Cancel", role: .cancel) {
103 // Alert dismissal is implicit; no additional action required.
104 }
103 Button(pendingDestructiveAction?.confirmationLabel ?? "Confirm", role: .destructive) { 105 Button(pendingDestructiveAction?.confirmationLabel ?? "Confirm", role: .destructive) {
104 guard let action = pendingDestructiveAction else { return } 106 guard let action = pendingDestructiveAction else { return }
105 pendingDestructiveAction = nil 107 pendingDestructiveAction = nil
@@ -608,7 +610,9 @@ private struct EditProfileSheet: View {
608 } 610 }
609 } 611 }
610 .alert("Remove Avatar?", isPresented: $isShowingRemoveAvatarConfirmation) { 612 .alert("Remove Avatar?", isPresented: $isShowingRemoveAvatarConfirmation) {
611 Button("Cancel", role: .cancel) {} 613 Button("Cancel", role: .cancel) {
614 // Alert dismissal is implicit; no additional action required.
615 }
612 Button("Remove Avatar", role: .destructive) { 616 Button("Remove Avatar", role: .destructive) {
613 Task { 617 Task {
614 await viewModel.removeAvatar() 618 await viewModel.removeAvatar()
Hutch/Views/Tickets/TicketDetailView.swift +3 −1
@@ -424,7 +424,9 @@ private struct EventRow: View {
424 .padding(.horizontal) 424 .padding(.horizontal)
425 .padding(.vertical, 8) 425 .padding(.vertical, 8)
426 .alert("System Status Change", isPresented: $isShowingSystemStatusInfo) { 426 .alert("System Status Change", isPresented: $isShowingSystemStatusInfo) {
427 Button("OK", role: .cancel) {} 427 Button("OK", role: .cancel) {
428 // Alert dismissal is implicit; no additional action required.
429 }
428 } message: { 430 } message: {
429 Text("This status change was recorded automatically or without a named user attached to the event.") 431 Text("This status change was recorded automatically or without a named user attached to the event.")
430 } 432 }