Skip to content

Commit

Permalink
fix swiftlint disable rule
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiMadlener committed Nov 18, 2024
1 parent d67fc80 commit e5da622
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 1 addition & 9 deletions ResearchKit/Common/ORKAnswerFormat.m
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ + (ORKWeightAnswerFormat *)weightAnswerFormatWithMeasurementSystem:(ORKMeasureme
defaultValue:defaultValue];
}

#if ORK_FEATURE_CLLOCATIONMANAGER_AUTHORIZATION && TARGET_OS_IOS
#if ORK_FEATURE_CLLOCATIONMANAGER_AUTHORIZATION && TARGET_OS_IOS && !TARGET_OS_VISION
+ (ORKLocationAnswerFormat *)locationAnswerFormat {
return [ORKLocationAnswerFormat new];
}
Expand All @@ -502,14 +502,6 @@ + (ORKSESAnswerFormat *)socioEconomicAnswerFormatWithTopRungText:(NSString *)top

#endif

#if !TARGET_OS_VISION

+ (ORKLocationAnswerFormat *)locationAnswerFormat {
return [ORKLocationAnswerFormat new];
}

#endif

+ (ORKBooleanAnswerFormat *)booleanAnswerFormat {
return [ORKBooleanAnswerFormat new];
}
Expand Down
3 changes: 2 additions & 1 deletion Sources/ResearchKitSwiftUIBridge/ORKOrderedTaskView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ public struct ORKOrderedTaskView: UIViewControllerRepresentable {
/// - shouldConfirmCancel: Specifies the behavior of the "Cancel" button if it should ask for confirmation. The button is always presented.
/// - result: A closure receiving the ``TaskResult`` for the task view.
@available(*, deprecated, message: "Use init(tasks:tintColor:cancelBehavior:result:) instead")
public init( // swiftlint:disable:this function_default_parameter_at_end
// swiftlint:disable:next function_default_parameter_at_end
public init(

Check failure on line 194 in Sources/ResearchKitSwiftUIBridge/ORKOrderedTaskView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

Attributes Violation: Attributes should be on their own lines in functions and types, but on the same line as variables and imports (attributes)

Check failure on line 194 in Sources/ResearchKitSwiftUIBridge/ORKOrderedTaskView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

Superfluous Disable Command Violation: SwiftLint rule 'function_default_parameter_at_end' did not trigger a violation in the disabled region; remove the disable command (superfluous_disable_command)
tasks: ORKOrderedTask,
tintColor: Color = Color(UIColor(named: "AccentColor") ?? .systemBlue),

Check failure on line 196 in Sources/ResearchKitSwiftUIBridge/ORKOrderedTaskView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

Function Default Parameter at End Violation: Prefer to locate parameters with defaults toward the end of the parameter list (function_default_parameter_at_end)
shouldConfirmCancel: Bool,
Expand Down

0 comments on commit e5da622

Please sign in to comment.