if
conditions can be merged CS-R1039Nested if
conditions can be merged together into a single condition. This can help improve code readability in complex codebases and reduce indentation level.
if (condition1)
{
if (condition2)
{
if (condition3)
{
// ...
}
}
}
if (condition1 && condition2 && condition3)
{
// ...
}