Skip to content

Linter Rule: Warn when if is being used with <%= #1604

@marcoroth

Description

@marcoroth

Good

<% if condition? %>
  ...
<% elsif another_condition? %>
  ...
<% end %>

Bad

<%= if condition? %>
  ...
<% elsif another_condition? %>
  ...
<% end %>
<% if condition? %>
  ...
<%= elsif another_condition? %>
  ...
<% end %>

I think this should also apply for another other control flow, like when/case, for, while, until, unless, etc.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions