Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for PartialInstanceVariable in ERB comment? #315

Open
steveclarke opened this issue Apr 11, 2023 · 0 comments
Open

False positive for PartialInstanceVariable in ERB comment? #315

steveclarke opened this issue Apr 11, 2023 · 0 comments

Comments

@steveclarke
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant