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 on the UnnecessaryStringOutput cop #500

Open
ydakuka opened this issue Mar 20, 2024 · 1 comment
Open

False positive on the UnnecessaryStringOutput cop #500

ydakuka opened this issue Mar 20, 2024 · 1 comment

Comments

@ydakuka
Copy link

ydakuka commented Mar 20, 2024

Describe

I have the haml code:

= "#{user.payment_price_btc}\u202F\u0243"

On the browser page:

0.01000000 Ƀ

I run haml-lint and I get:

ydakuka@yauhenid:~/Work/project$ haml-lint ./app/views/users/
app/views/users/_list.html.haml:59 [W] UnnecessaryStringOutput: `= "..."` should be rewritten as `...`

45 files inspected, 1 lint detected

However, if I follow the recommendation, I'll get the following haml code:

#{user.payment_price_btc}\u202F\u0243

And this, on the browser page:

0.01000000\u202F\u0243
@sds sds added the bug label May 29, 2024
@mingan
Copy link

mingan commented Aug 16, 2024

Not sure if it's the same bug but

= "#{t('some.key')}: "

is marked as well (notice the colon at the end).

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

No branches or pull requests

3 participants