I have some cases where I want to use a force cast - e.g. when it would be a programming error if the force failed. One example is loading a view controller from a storyboard. Is there any way to ignore specific violations of a rule?
Thanks,
_David_
You can wrap your valid cases in comments:
// swiftlint:disable force_cast
let foo = bar as! Bad
// swiftlint:enable force_cast
Great, that works. Thanks!
No problem, we'll update the readme soon!
Most helpful comment
You can wrap your valid cases in comments: