Skip to content

Commit 1d94b54

Browse files
Fix SwiftLint failures for latest version (#209) (#210)
1 parent 75a2db8 commit 1d94b54

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎.github/workflows/build-and-test.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ jobs:
2323
with:
2424
artifactname: Balance.xcresult
2525
setupfirebaseemulator: true
26-
customcommand: "firebase emulators:exec 'fastlane test'"
26+
customcommand: |
27+
export JAVA_HOME="$JAVA_HOME_21_arm64"
28+
export PATH="$JAVA_HOME/bin:$PATH"
29+
java -version
30+
firebase emulators:exec 'fastlane test'
2731
uploadcoveragereport:
2832
name: Upload Coverage Report
2933
needs: buildandtest

‎.swiftlint.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ only_rules:
139139
- implicitly_unwrapped_optional
140140
# Identifiers should use inclusive language that avoids discrimination against groups of people based on race, gender, or socioeconomic status
141141
- inclusive_language
142-
# If defer is at the end of its parent scope, it will be executed right where it is anyway.
143-
- inert_defer
144142
# Prefer using Set.isDisjoint(with:) over Set.intersection(_:).isEmpty.
145143
- is_disjoint
146144
# Discouraged explicit usage of the default separator.
@@ -217,7 +215,7 @@ only_rules:
217215
# Operators should be surrounded by a single whitespace when they are being used.
218216
- operator_usage_whitespace
219217
# Operators should be surrounded by a single whitespace when defining them.
220-
- operator_whitespace
218+
- function_name_whitespace
221219
# Matching an enum case against an optional enum without ‘?’ is supported on Swift 5.1 and above.
222220
- optional_enum_case_matching
223221
# A doc comment should be attached to a declaration.
@@ -259,7 +257,7 @@ only_rules:
259257
# Objective-C attribute (@objc) is redundant in declaration.
260258
- redundant_objc_attribute
261259
# Initializing an optional variable with nil is redundant.
262-
- redundant_optional_initialization
260+
- implicit_optional_initialization
263261
# Property setter access level shouldn't be explicit if it's the same as the variable access level.
264262
- redundant_set_access_control
265263
# String enum values can be omitted when they are equal to the enumcase name.
@@ -329,8 +327,6 @@ only_rules:
329327
- unowned_variable_capture
330328
# Catch statements should not declare error variables without type casting.
331329
- untyped_error_in_catch
332-
# Unused reference in a capture list should be removed.
333-
- unused_capture_list
334330
# Unused parameter in a closure should be replaced with _.
335331
- unused_closure_parameter
336332
# Unused control flow label should be removed.

‎Balance/Utils/BalanceExtensions.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ extension Notification.Name {
134134
static let heartAlert = Notification.Name("heartAlert")
135135
}
136136

137-
// swiftlint:disable operator_whitespace
137+
// swiftlint:disable function_name_whitespace
138138
// swiftlint:disable large_tuple
139139
extension Date {
140140
static func -(recent: Date, previous: Date) -> (hour: Int?, minute: Int?, second: Int?) {

‎Balance/Utils/Constant.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ enum DistractMeOption: UInt32 {
4343
maxValue += 1
4444
}
4545
return maxValue
46-
}()
46+
}()
4747

4848
static func randomSection() -> DistractMeOption {
4949
// pick and return a new value

0 commit comments

Comments
 (0)