We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following string is auto-corrected incorrectly by Style/RedundantStringEscape:
"#\{foo\}"
The second escape is not necessary, but the first one is. So one good correction is:
"#\{foo}"
It seems to be more common to escape the # instead, so an alternative good correction is:
#
"\#{foo}"
The string is corrected to the following, which is definitely not correct:
"#{foo}"
foo.rb
rubocop -a foo.rb --only Style/RedundantStringEscape
$ [bundle exec] rubocop -V 1.37.0 (using Parser 3.1.2.1, rubocop-ast 1.22.0, running on ruby 3.1.2) [x86_64-linux]
The text was updated successfully, but these errors were encountered:
05e4611
No branches or pull requests
The following string is auto-corrected incorrectly by Style/RedundantStringEscape:
Expected behavior
The second escape is not necessary, but the first one is. So one good correction is:
It seems to be more common to escape the
#
instead, so an alternative good correction is:Actual behavior
The string is corrected to the following, which is definitely not correct:
Steps to reproduce the problem
foo.rb
containingrubocop -a foo.rb --only Style/RedundantStringEscape
.RuboCop version
The text was updated successfully, but these errors were encountered: