Why you should care
If and else statements are considered to be time consuming in nature as they tend to be repetitive in order to execute the code properly which causes is not ideal for a programmer and can also be considered taxing for the CPU.
How we detect
This code insight’s rationale is that using unconditional if, and else, tends to greatly consume time as well as memory. It is recommended to review the source code and reduce the number of unconditional if and else-if statements.
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.