From 1e223745d0fa979776b1889b616ffc9598228bcf Mon Sep 17 00:00:00 2001 From: Sebastian Ricaldoni Date: Tue, 17 Mar 2026 13:35:05 -0300 Subject: [PATCH 1/3] Fix SwiftLint failures for latest version (issue #209) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove inert_defer (no longer a valid rule) - Rename operator_whitespace → function_name_whitespace - Rename redundant_optional_initialization → implicit_optional_initialization - Remove unused_capture_list (no longer a valid rule) - Update inline swiftlint:disable comment in BalanceExtensions.swift - Fix closure_end_indentation violation in Constant.swift Closes #209 --- .swiftlint.yml | 8 ++------ Balance/Utils/BalanceExtensions.swift | 2 +- Balance/Utils/Constant.swift | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index f4b2f28..8ffc82b 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -139,8 +139,6 @@ only_rules: - implicitly_unwrapped_optional # Identifiers should use inclusive language that avoids discrimination against groups of people based on race, gender, or socioeconomic status - inclusive_language - # If defer is at the end of its parent scope, it will be executed right where it is anyway. - - inert_defer # Prefer using Set.isDisjoint(with:) over Set.intersection(_:).isEmpty. - is_disjoint # Discouraged explicit usage of the default separator. @@ -217,7 +215,7 @@ only_rules: # Operators should be surrounded by a single whitespace when they are being used. - operator_usage_whitespace # Operators should be surrounded by a single whitespace when defining them. - - operator_whitespace + - function_name_whitespace # Matching an enum case against an optional enum without ‘?’ is supported on Swift 5.1 and above. - optional_enum_case_matching # A doc comment should be attached to a declaration. @@ -259,7 +257,7 @@ only_rules: # Objective-C attribute (@objc) is redundant in declaration. - redundant_objc_attribute # Initializing an optional variable with nil is redundant. - - redundant_optional_initialization + - implicit_optional_initialization # Property setter access level shouldn't be explicit if it's the same as the variable access level. - redundant_set_access_control # String enum values can be omitted when they are equal to the enumcase name. @@ -329,8 +327,6 @@ only_rules: - unowned_variable_capture # Catch statements should not declare error variables without type casting. - untyped_error_in_catch - # Unused reference in a capture list should be removed. - - unused_capture_list # Unused parameter in a closure should be replaced with _. - unused_closure_parameter # Unused control flow label should be removed. diff --git a/Balance/Utils/BalanceExtensions.swift b/Balance/Utils/BalanceExtensions.swift index be4a741..c2f3a82 100644 --- a/Balance/Utils/BalanceExtensions.swift +++ b/Balance/Utils/BalanceExtensions.swift @@ -134,7 +134,7 @@ extension Notification.Name { static let heartAlert = Notification.Name("heartAlert") } -// swiftlint:disable operator_whitespace +// swiftlint:disable function_name_whitespace // swiftlint:disable large_tuple extension Date { static func -(recent: Date, previous: Date) -> (hour: Int?, minute: Int?, second: Int?) { diff --git a/Balance/Utils/Constant.swift b/Balance/Utils/Constant.swift index f9e528f..a820775 100644 --- a/Balance/Utils/Constant.swift +++ b/Balance/Utils/Constant.swift @@ -43,7 +43,7 @@ enum DistractMeOption: UInt32 { maxValue += 1 } return maxValue - }() + }() static func randomSection() -> DistractMeOption { // pick and return a new value From 2cbeaea122fa06c6b2d2563ba499361493e17be1 Mon Sep 17 00:00:00 2001 From: Sebastian Ricaldoni Date: Mon, 23 Mar 2026 10:40:46 -0300 Subject: [PATCH 2/3] Attempt to fix min JAVA req --- .github/workflows/build-and-test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7d772e9..c580bfb 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,7 +23,11 @@ jobs: with: artifactname: Balance.xcresult setupfirebaseemulator: true - customcommand: "firebase emulators:exec 'fastlane test'" + customcommand: | + export JAVA_HOME="$JAVA_HOME_21_X64" + export PATH="$JAVA_HOME/bin:$PATH" + java -version + firebase emulators:exec 'fastlane test' uploadcoveragereport: name: Upload Coverage Report needs: buildandtest From 818a49549ea987d3cc87ea1281a7d6a9a43ed813 Mon Sep 17 00:00:00 2001 From: Sebastian Ricaldoni Date: Mon, 23 Mar 2026 10:50:11 -0300 Subject: [PATCH 3/3] Setting correct JDK variable name --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c580bfb..82b47c6 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,7 +24,7 @@ jobs: artifactname: Balance.xcresult setupfirebaseemulator: true customcommand: | - export JAVA_HOME="$JAVA_HOME_21_X64" + export JAVA_HOME="$JAVA_HOME_21_arm64" export PATH="$JAVA_HOME/bin:$PATH" java -version firebase emulators:exec 'fastlane test'