Remix.run Logo
willtemperley 8 hours ago

Yes swift-format will say "never force-unwrap" because it is a potential crash.

saagarjha an hour ago | parent [-]

No it will not.

28 minutes ago | parent | next [-]
[deleted]
willtemperley 26 minutes ago | parent | prev | next [-]

Are you sure about that?

let x: Int? = 0

let y: Int = x!

git ls-files -z -- '*.swift' | xargs -0 swift format lint --parallel

error: [NeverForceUnwrap] do not force unwrap 'x'

saagarjha 12 minutes ago | parent [-]

You’ve turned that on; it’s off by default for good reasons: https://github.com/swiftlang/swift-format/blob/02c5a88a32719...

30 minutes ago | parent | prev [-]
[deleted]