Search documentation of Metastatic

# Metastatic.Analysis.SimplifyConditional (Metastatic v0.13.2)

View Source

Suggests simplification of redundant conditionals.

Detects conditionals that return boolean literals and can be simplified to direct boolean expressions.

## Patterns Detected

1. `if condition then true else false` → `condition`
2. `if condition then false else true` → `not condition`
3. `if condition then condition else false` → `condition`
4. `if condition then true else condition` → `condition`

## Examples

    # Before
    if x > 5 then true else false

    # After
    x > 5

    # Before
    if is_valid then false else true

    # After
    not is_valid