Skip to content

Files

Latest commit

 

History

History
30 lines (21 loc) · 434 Bytes

Lint-LiteralAssignmentInCondition.md

File metadata and controls

30 lines (21 loc) · 434 Bytes

Pattern: Literal assignment in condition

Issue: -

Description

Checks for literal assignments in the conditions of if, while, and until.

Examples

# bad
if x = 42
  do_something
end

# good
if x == 42
  do_something
end

# good
if x = y
  do_something
end

Further Reading