Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 1dc00f4

Browse files
steipeteclaude
andcommitted
Fix trailing closure SwiftLint violation - achieve 0 linter violations
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d6fe125 commit 1dc00f4

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

Core/Utilities/ErrorHandling/ErrorRecoveryService.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,9 @@ public class ErrorRecoveryService {
112112

113113
switch strategy {
114114
case .retry:
115-
return try await retryManager.execute(
116-
operation: operation,
117-
onRetry: { attempt, error, delay in
118-
self.logger.info("🔄 Retrying '\(context)' (attempt \(attempt)) after \(delay)s: \(error)")
119-
}
120-
)
115+
return try await retryManager.execute(operation: operation) { attempt, error, delay in
116+
self.logger.info("🔄 Retrying '\(context)' (attempt \(attempt)) after \(delay)s: \(error)")
117+
}
121118

122119
case let .fallback(fallbackOp):
123120
do {

Tests/SessionLoggingTests.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import Foundation
44
import OSLog
55
import Testing
66

7-
// Use Diagnostics.LogCategory to avoid ambiguity
8-
typealias LogCategory = Diagnostics.LogCategory
7+
// Import explicitly to avoid conflicts
98

109
@Suite("Session Logging", .tags(.diagnostics, .core))
1110
struct SessionLoggingTests {
@@ -206,13 +205,13 @@ struct SessionLoggingTests {
206205
@Test(
207206
"Category logger retrieval",
208207
arguments: [
209-
LogCategory.app,
208+
Diagnostics.LogCategory.app,
210209
.auth,
211210
.api,
212211
.supervision,
213212
]
214213
)
215-
@MainActor func categoryLoggerRetrieval(category: LogCategory) {
214+
@MainActor func categoryLoggerRetrieval(category: Diagnostics.LogCategory) {
216215
let logManager = Diagnostics.LogManager.shared
217216
let logger = logManager.getLogger(for: category)
218217

@@ -249,10 +248,10 @@ struct SessionLoggingTests {
249248
"Category-based logger creation",
250249
arguments: zip(
251250
[String.self, Int.self, SessionLoggingTests.self] as [Any.Type],
252-
[LogCategory.app, .api, .supervision]
251+
[Diagnostics.LogCategory.app, .api, .supervision]
253252
)
254253
)
255-
func categoryBasedLoggerCreation(type: Any.Type, category: LogCategory) {
254+
func categoryBasedLoggerCreation(type: Any.Type, category: Diagnostics.LogCategory) {
256255
let logger = LoggerFactory.logger(for: type, category: category)
257256

258257
#expect(throws: Never.self) {

0 commit comments

Comments
 (0)