Boolean Assigned in If/Else Branches
Identifies conditional assignments to mutually exclusive Boolean literal values in conditional branches.
Reasoning
The assignment could be made directly to the result of the conditional Boolean expression instead.
Default severity
Warning
Inspection type
NamingAndConventionsIssues
Examples
This example should trigger a result
This example should NOT trigger a result
Rubberduck.CodeAnalysis.Inspections.Concrete.BooleanAssignedInIfElseInspection.cs (Prerelease-v2.5.9.6289)