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

Validate implicitly unwrapped optionals #56

Closed
jpsim opened this issue May 28, 2015 · 6 comments
Closed

Validate implicitly unwrapped optionals #56

jpsim opened this issue May 28, 2015 · 6 comments
Labels
rule-request Requests for a new rules.

Comments

@jpsim
Copy link
Collaborator

jpsim commented May 28, 2015

Implicitly unwrapped optionals should not be used.

@jpsim jpsim added the rule-request Requests for a new rules. label May 28, 2015
@throughnothing
Copy link

+1 for this

@frederic-adda
Copy link

I don't agree, they are quite useful

@BrianDoig
Copy link

If crashing is ok in your product, then yes they are useful. If management yells at you if you have crashes then they aren't ok...

@throughnothing
Copy link

@frederic-adda It would just be an option to turn on. You'd be free to keep it off, of course.

@jpsim
Copy link
Collaborator Author

jpsim commented Nov 24, 2016

To clarify, implicitly unwrapped optionals certainly have their place, but using them superfluously is certainly a code smell that might indicate that the code should be refactored to avoid them.

If a SwiftLint rule would apply 100% of the time, it should go in the Swift compiler. A linter exists to help identify code smells, not things that are incorrect 100% of the time. That's the language's job.

@marcelofabri
Copy link
Collaborator

Fixed on #1362 💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

5 participants