There are linters that will do this for you. In particular swiftlint has a 
force_unwrapping rule that you can enable. You can add a script build phase to 
your Xcode project and e.g. have it run only when archiving the project, etc.

> On Mar 13, 2017, at 5:59 AM, Kenny Leung via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> For my own part, I never want to use “!” in my code, and I’m sticking to it 
> pretty well.
> 
> It has been said many times that we don’t want to create different dialects 
> of Swift, and I agree. Would it be considered a different dialect to add a 
> compiler option that forbids the use of “!” in my own code? So someone else 
> looking at or compiling my code, they could not tell that I used such an 
> option, so I think it fits within the definition of non-dialectedness.
> 
> -Kenny
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to