Closed ppamorim closed 2 years ago
Similar to https://github.com/realm/SwiftLint/issues/3611 but https://github.com/realm/SwiftLint/pull/3599 won't fix.
For the given variable:
private var fooDelegate: Bool = false
When running:
$ swiftlint --fix
Swiftlint is transforming var to weak var probably because it has delegate on the name, this is causing the compilation to fail.
var
weak var
delegate
swiftlint version
disabled_rules: - identifier_name - line_length - todo - cyclomatic_complexity - type_body_length - file_length - function_body_length - function_parameter_count - nesting - block_based_kvo - unused_closure_parameter - explicit_type_interface - large_tuple - inclusive_language opt_in_rules: # some rules are only opt-in - explicit_type_interface - force_unwrapping - implicit_return - attributes - closure_end_indentation - closure_spacing - conditional_returns_on_newline - empty_string - contains_over_first_not_nil # - empty_count //Disabled due Realm conflict # - first_where //Disabled due Realm conflict excluded: - Carthage - Pods force_cast: warning force_try: warning
xcodebuild -version
I'm removing the rule here: https://github.com/realm/SwiftLint/pull/3809
It's extremely prone to false positives.
New Issue Checklist
Similar to https://github.com/realm/SwiftLint/issues/3611 but https://github.com/realm/SwiftLint/pull/3599 won't fix.
Describe the bug
For the given variable:
When running:
Swiftlint is transforming
var
toweak var
probably because it hasdelegate
on the name, this is causing the compilation to fail.Environment
swiftlint version
to be sure)? 0.45.1xcodebuild -version
)? Xcode 13.2.1