Assignment expression in conditional
Reports usages of assignment expressions in conditionals. Assignments in conditionals can make the code harder to read and are often a typo (=
instead of ==
).
Use the Report assignments in parentheses checkbox to highlight assignments in parentheses.
Inspection options
Option | Type | Default |
---|---|---|
Report assignments in parentheses | Checkbox | false |
Inspection Details | |
---|---|
Available in: | Qodana for Ruby 2023.3, RubyMine 2023.3 |
Plugin: | Ruby, 233.SNAPSHOT |
Last modified: 13 July 2023