Inspectopedia
 
2024.3

'if' statement with identical branches or common parts

Info
New
Last modified: 03 December 2024

Reports if statements in which common parts can be extracted from the branches.

These common parts are independent from the condition and make if statements harder to understand.

Example:

After the quick-fix is applied:

Updated in 2018.1