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

Dschee opened this Issue Sep 28, 2018 · 0 comments


None yet
1 participant
Copy link

Dschee commented Sep 28, 2018

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

  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