Skip to content

False positive for PartialInstanceVariable in ERB comment? #315

Description

@steveclarke

When my .erb-lint.yml contains:

linters:
  PartialInstanceVariable:
    enabled: true

and I have the following commented-out line in my _form.html.erb file:

<%#= debug_json @employer.contracts %>

erblint app/views/configuration/employers/_form.html.erb reports:

Linting 1 files with 16 linters...

Instance variable detected in partial.
In file: app/views/configuration/employers/_form.html.erb:195

It's nice that erblint warns me that, should I uncomment the code, it would trigger an issue, but is this expected behaviour? I would have expected erblint to ignore anything in comments. What if I wanted to use that comment to say what not to write?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions