Fix SwiftLint failures for latest version (#209)#210
Conversation
- 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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #210 +/- ##
=====================================
Coverage 5.06% 5.06%
=====================================
Files 130 130
Lines 2158 2158
=====================================
Hits 109 109
Misses 2049 2049
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the repo’s SwiftLint configuration and related source annotations to be compatible with newer SwiftLint versions (0.63+), resolving CI lint failures; additionally adjusts the CI test command to explicitly set up Java before running Firebase emulators.
Changes:
- Remove/rename SwiftLint rule identifiers in
.swiftlint.ymlto match SwiftLint 0.63+. - Update inline SwiftLint disable comment in
BalanceExtensions.swiftand fix an indentation violation inConstant.swift. - Modify the CI
build-and-testworkflow’s custom command to export a specific Java home before running emulator-backed tests.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
Balance/Utils/Constant.swift |
Fixes closure_end_indentation by adjusting the closure end indentation. |
Balance/Utils/BalanceExtensions.swift |
Updates inline SwiftLint rule disable to the renamed rule identifier. |
.swiftlint.yml |
Removes obsolete rules and renames rules to new SwiftLint identifiers. |
.github/workflows/build-and-test.yml |
Adds explicit Java env setup before running firebase emulators:exec tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
inert_deferandunused_capture_list— no longer valid rule identifiers in SwiftLint 0.63+operator_whitespace→function_name_whitespacein.swiftlint.ymland inline disable comment inBalanceExtensions.swiftredundant_optional_initialization→implicit_optional_initializationin.swiftlint.ymlclosure_end_indentationviolation inConstant.swift:46$JAVA_HOME_21_arm64.firebase emulators:execwas complaining about using older Java versionTest plan
swiftlint lint --strictpasses locally with 0 violations on SwiftLint 0.63.2Closes #209