Pattern: Assignment in condition
Issue: -
This rule checks for assignments in the conditions of if
/while
/until
.
# bad
if some_var = true
do_something
end
# good
if some_var == true
do_something
end
Attribute | Value |
---|---|
AllowSafeAssignment | true |