operator_usage_whitespace rule false positive for unwrapping of the optional optional #2728
Closed
Description
- Updated SwiftLint to the latest version (0.31.0)
- I searched for existing GitHub issues
SwiftLint thinks that ??
is a nil coalescing operator, while it's a unwrapping of the optional optional.
func success(for item: Item) {
item.successHandler??() // <- triggers operator_usage_whitespace, bc there's no spaces around ??, but item.successHandler is an optional optional
}
Would be nice to make operator_usage_whitespace
rule configurable so you can exclude specific operators (??
). #1013