You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't use ternary as an alternative for if else #2358
Should the rule be opt-in or enabled by default? Why?
It can be enabled by default
And I'd make this rule disabled by default 'cause it's quite exotic behavior for C/Objective-C/Swift and many people may want to use it as they used to.
Reacted by David Catmull, mikhailyaskou, Emre Çiftçi, ocodo, JoshParadroid, andrii-lisovskiy, Haroon Ur Rasheed and NikeKov
Activity
drrost commentedon Dec 4, 2018
I'd suggest not allow to call functions in the 2nd and 3rd part that return
void.drrost commentedon Dec 4, 2018
And I'd make this rule disabled by default 'cause it's quite exotic behavior for C/Objective-C/Swift and many people may want to use it as they used to.
Add `void_function_in_ternary` opt-in rule
Add `void_function_in_ternary` opt-in rule
Add `void_function_in_ternary` opt-in rule (#3085)
Add `prohibited_nan_comparison` opt-in rule
Add `prohibited_nan_comparison` opt-in rule