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

Suggested cop: Warn of unnecessary escaping in strings #10439

Closed
andyw8 opened this issue Mar 3, 2022 · 0 comments
Closed

Suggested cop: Warn of unnecessary escaping in strings #10439

andyw8 opened this issue Mar 3, 2022 · 0 comments

Comments

@andyw8
Copy link
Contributor

andyw8 commented Mar 3, 2022

For example:

irb(main):026:0> "hello \##{1 + 1}"
=> "hello #2"

There's no need to escape the # here.

This might be able to share some behaviour with Style/RedundantRegexpEscape. (it could be named RedundantStringEscape).

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

2 participants