Skip to content

Linter: False positives for actionview-no-silent-helper in 0.9.6 #1629

Description

@janko

When linting this HTML+ERB file:

<% if true %>
  <%= link_to "Foo", foo_path %>
<% end %>

I get the following offense:

[error] Avoid using <% %> with link_to. Use <%= %> to ensure the helper's output is rendered. (actionview-no-silent-helper)

app/views/building_admin/custom_screensavers/_custom_screensaver.html.erb:1:0

  →   1 │ <% if true %>
        │ ~~~~~~~~~
      2 │   <%= link_to "Foo", foo_path %>
      3 │ <% end %>

This seems to be a regression in 0.9.6, as the same file produces no offenses on 0.9.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions