Inspectopedia
 
2024.3

Constant conditions

Warning
New
Last modified: 03 December 2024

Reports non-trivial conditions and values that are statically known to be always true, false, null or zero. While sometimes intended, often this is a sign of logical error in the program. Additionally, reports never reachable when branches and some expressions that are statically known to fail always.

Examples:

Uncheck the "Warn when constant is stored in variable" option to avoid reporting of variables having constant values not in conditions.

New in 2021.3