Skip to content

Fix SwiftLint failures for latest version (#209)#210

Merged
sebastianricaldoni merged 3 commits into
mainfrom
BAL-209-fix-swiftlint-latest
Mar 23, 2026
Merged

Fix SwiftLint failures for latest version (#209)#210
sebastianricaldoni merged 3 commits into
mainfrom
BAL-209-fix-swiftlint-latest

Conversation

@sebastianricaldoni
Copy link
Copy Markdown
Collaborator

@sebastianricaldoni sebastianricaldoni commented Mar 17, 2026

Summary

  • Remove inert_defer and unused_capture_list — no longer valid rule identifiers in SwiftLint 0.63+
  • Rename operator_whitespacefunction_name_whitespace in .swiftlint.yml and inline disable comment in BalanceExtensions.swift
  • Rename redundant_optional_initializationimplicit_optional_initialization in .swiftlint.yml
  • Fix closure_end_indentation violation in Constant.swift:46
  • Overrides JAVA_HOME to stop using 17 and instead use $JAVA_HOME_21_arm64. firebase emulators:exec was complaining about using older Java version

Test plan

  • swiftlint lint --strict passes locally with 0 violations on SwiftLint 0.63.2

Closes #209

- 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
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 5.06%. Comparing base (75a2db8) to head (818a495).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #210   +/-   ##
=====================================
  Coverage   5.06%   5.06%           
=====================================
  Files        130     130           
  Lines       2158    2158           
=====================================
  Hits         109     109           
  Misses      2049    2049           
Files with missing lines Coverage Δ
Balance/Utils/BalanceExtensions.swift 4.55% <ø> (ø)
Balance/Utils/Constant.swift 0.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75a2db8...818a495. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to match SwiftLint 0.63+.
  • Update inline SwiftLint disable comment in BalanceExtensions.swift and fix an indentation violation in Constant.swift.
  • Modify the CI build-and-test workflow’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.

Comment thread .swiftlint.yml
Comment thread .github/workflows/build-and-test.yml
Comment thread .github/workflows/build-and-test.yml
@sebastianricaldoni sebastianricaldoni requested review from PSchmiedmayer and gperissetcelteeka and removed request for PSchmiedmayer March 23, 2026 14:04
@sebastianricaldoni sebastianricaldoni merged commit 1d94b54 into main Mar 23, 2026
9 checks passed
@sebastianricaldoni sebastianricaldoni deleted the BAL-209-fix-swiftlint-latest branch March 23, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix SwiftLint failures after upgrading to latest version

3 participants