Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

false positive explicit_type_interface on if-case-let #4548

Closed
2 tasks done
dwirandytlvk opened this issue Nov 16, 2022 · 0 comments · Fixed by #4638
Closed
2 tasks done

false positive explicit_type_interface on if-case-let #4548

dwirandytlvk opened this issue Nov 16, 2022 · 0 comments · Fixed by #4638
Labels
bug Unexpected and reproducible misbehavior.

Comments

@dwirandytlvk
Copy link

New Issue Checklist

Describe the bug

All the if statements that have a let inside the case clause are triggering this rule.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint

Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)

Environment

  • SwiftLint version 0.49.1
  • Installation method used (Cocoapods)?
  • Paste your configuration file:
only_rules:
- anyobject_protocol
- control_statement
- explicit_type_interface
- force_unwrapping
- force_cast
- identifier_name
- trailing_semicolon
- line_length
- legacy_constructor
- legacy_constant
- legacy_cggeometry_functions
- legacy_nsgeometry_functions
- return_arrow_whitespace
- redundant_void_return
- void_return
- unused_closure_parameter
- closure_spacing
- operator_usage_whitespace
- implicitly_unwrapped_optional
- explicit_init
- sorted_imports
- closing_brace
- comma
- duplicate_enum_cases
- duplicate_imports
- statement_position
anyobject_protocol:
  severity: error
identifier_name:
  min_length:
    error: 2
trailing_semicolon:
  severity: error
line_length:
  warning: 200
  ignores_function_declarations: true
  ignores_comments: true
  ignores_interpolated_strings: true
  ignores_urls: true
statement_position:
  statement_mode: uncuddled_else
control_statement:
  severity: error
force_unwrapping:
  severity: error
implicitly_unwrapped_optional:
  severity: error
force_cast:
  severity: warning
duplicate_imports:
  severity: error

  • Which Xcode version are you using (check xcodebuild -version)? xcode 14.0.1
  • Do you have a sample that shows the issue?
// This triggers a violation:
if case .failure(let error) = errorCompletion {

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants