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

Interpolation in symbols brings about Style/StringLiterals rather than Style/StringLiteralsInInterpolation #12059

Closed
vinnydiehl opened this issue Jul 21, 2023 · 0 comments · Fixed by #12060

Comments

@vinnydiehl
Copy link

vinnydiehl commented Jul 21, 2023

This problem is especially noticeable when using EnforcedStyle: double_quotes for Style/StringLiterals, as it corrects strings and symbols inconsistently.

To reproduce

With default settings, run RuboCop on:

:"foo#{"sar".sub("s", "b")}"

Expected behavior

A Style/StringLiteralsInInterpolation warning for each string inside of the interpolation.

Actual behavior

A Style/StringLiterals warning for each string inside of the interpolation.

RuboCop version

1.54.2 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-linux]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant