From f9cb9fc8afa9cad24da7e0e0043d3a32e575593b Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 5 May 2026 11:24:43 +1000 Subject: [PATCH] Enable SwiftLint rule: redundant_type_annotation Adds the rule to `only_rules`. SwiftLint --fix removed redundant explicit type annotations on `let`/`var` declarations where Swift's type inference produces the same type from the right-hand side. Part of the Orchard SwiftLint rollout campaign. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.7 --- .swiftlint.yml | 3 +++ Sources/Encrypted Logs/ExponentialBackoffTimer.swift | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index ef8311c1..5a553cdc 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -50,6 +50,9 @@ only_rules: # over `CGPoint(x: 0, y: 0)`). - prefer_zero_over_explicit_init + # Type annotations are redundant when the type can be inferred. + - redundant_type_annotation + # Use shorthand syntax for optional binding (`if let foo` instead of # `if let foo = foo`). - shorthand_optional_binding diff --git a/Sources/Encrypted Logs/ExponentialBackoffTimer.swift b/Sources/Encrypted Logs/ExponentialBackoffTimer.swift index a6536ce2..42d54b1a 100644 --- a/Sources/Encrypted Logs/ExponentialBackoffTimer.swift +++ b/Sources/Encrypted Logs/ExponentialBackoffTimer.swift @@ -56,5 +56,5 @@ struct ExponentialBackoffTimer { private(set) internal var next: DispatchTime = .now() /// A `Date` representation of `next`. - private(set) var nextDate: Date = Date() + private(set) var nextDate = Date() }