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

UnnecessaryInterpolation reports false positives #30

Closed
fshowalter opened this issue Sep 14, 2014 · 1 comment
Closed

UnnecessaryInterpolation reports false positives #30

fshowalter opened this issue Sep 14, 2014 · 1 comment
Labels

Comments

@fshowalter
Copy link
Contributor

The UnnecessaryInterpolation linter uses this to determine if a line is only interpolation:

def only_interpolation?(content)
  content.lstrip.start_with?('"#{')
end

Thus lines like this

  %tag #{some}/partially/#{interpolated}/#{value}

Raise when they shouldn't. My first thought would be to try to gsub out all the interpolation via regex then check to see if anything's left, but that seems error-prone and expensive. Any better ideas?

@sds sds added the bug label Sep 14, 2014
@sds
Copy link
Owner

sds commented Sep 14, 2014

Good catch, @fshowalter.

I believe I've fixed this in 3052573. Thanks for the report!

@sds sds closed this as completed Sep 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants