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 positives when using explicit_type_interface with allowRedundancy #2425

Closed
Jeehut opened this issue Sep 28, 2018 · 0 comments
Closed

Comments

@Jeehut
Copy link
Collaborator

Jeehut commented Sep 28, 2018

Using the lastest SwiftLint version, when I use the rule explicit_type_interface with this configuration

explicit_type_interface:
  allow_redundancy: true

most of the cases are handled correctly. But for some initializers Swift has some sugar syntax integrated and some initializers might throw. In both cases this option doesn't work correctly.

Specifically, the following three lines are shown as warnings but shouldn't:

let regex = try! NSRegularExpression(pattern: ".*")
let array = [String]()
let dict = [String: String]()
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

No branches or pull requests

1 participant