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

(key as? String)! ignored by ForceCastRule #129

Closed
alexpersian opened this issue Sep 7, 2015 · 2 comments
Closed

(key as? String)! ignored by ForceCastRule #129

alexpersian opened this issue Sep 7, 2015 · 2 comments

Comments

@alexpersian
Copy link

After running SwiftLint on my project I found that the ForceCastRule is ignoring force casts in the form of (key as? String)!.

Looking through the Swift file it looks like the linter is only looking for force casts in the form of as!.

@jpsim
Copy link
Collaborator

jpsim commented Sep 7, 2015

(key as? String)! isn't a force cast, but rather a force-unwrap, which is a rule we'd like to add and are tracking as #55. So I'm closing this as a duplicate.

@jpsim jpsim closed this as completed Sep 7, 2015
@alexpersian
Copy link
Author

Thanks for the response and clarification.

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

2 participants