Inspectopedia
 
2025.2

'if' statement with identical branches or common parts

Info
Last modified: Last modified: 18 September 2025

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