From e732d11f514e68e8fad97f95d846ca7f85a780df Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 5 May 2026 09:59:05 +1000 Subject: [PATCH] Enable SwiftLint rule: last_where Adds the rule to `only_rules`. No violations in current codebase. The rule prefers `xs.last(where: { ... })` over `xs.filter { ... }.last` and will catch new occurrences in future code. 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 +++ 1 file changed, 3 insertions(+) diff --git a/.swiftlint.yml b/.swiftlint.yml index ef8311c1..061f21c7 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -39,6 +39,9 @@ only_rules: # Empty strings should be compared to `""` only if `isEmpty` cannot be used. - empty_string + # Prefer `last(where:)` over `filter { }.last`. + - last_where + # MARK comment should be in valid format. - mark