Inspectopedia
 
2024.3

Negated conditional expression

Warning
Code Style
New
Last modified: 03 December 2024

Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: !condition ? 2 : 1