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

Force Cast Violation #109

Closed
lfaoro opened this issue Aug 29, 2015 · 2 comments
Closed

Force Cast Violation #109

lfaoro opened this issue Aug 29, 2015 · 2 comments

Comments

@lfaoro
Copy link

lfaoro commented Aug 29, 2015

e.g.: let app = NSApp.delegate as! AppDelegate
Issue: error: Force Cast Violation (High Severity): Force casts should be avoided

e.g.: let app = (NSApp.delegate as? AppDelegate)!
Issue: none, it passes

Is this the expected behavior?

@jpsim
Copy link
Collaborator

jpsim commented Aug 29, 2015

The force cast rule only checks for as!. You're welcome to write a force unwrap rule.

@jpsim
Copy link
Collaborator

jpsim commented Aug 31, 2015

Closing as a duplicate of #55.

@jpsim jpsim closed this as completed Aug 31, 2015
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