Permalink
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (39 sloc) 1 KB

RCS1104: Simplify conditional expression

Property Value
Id RCS1104
Category Simplification
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Examples

Code with Diagnostic

bool x = y ? true : false; // RCS1104

Code with Fix

bool x = y;

Code with Diagnostic

bool x = y ? z : false; // RCS1104

Code with Fix

bool x = y && z;

Code with Diagnostic

bool x = y ? true : z; // RCS1104

Code with Fix

bool x = y || z;

See Also

(Generated with DotMarkdown)