Inspectopedia
 
2024.3

Constant condition

Warning
Code Style
New
Last modified: 03 December 2024

Reports conditions in code that always evaluate to true or false.

Example:

In the given example, the second condition if file == nil is redundant. It will always evaluate to false as it repeats a check already performed in the code.