-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
gsub -> tr cop messes up escaped string #2154
Labels
Comments
/cc @rrosenblum |
Thanks for the bug report. Escape characters tend to get nasty when dealing with auto-correct. I have a test case for |
Awesome, thanks ;) |
rrosenblum
added a commit
to rrosenblum/rubocop
that referenced
this issue
Aug 20, 2015
bbatsov
added a commit
that referenced
this issue
Aug 20, 2015
[Fix #2154] Fix auto-correct of StringReplacement with a backslash
🤘 Thanks |
I see the behavior below on
|
Good catch. |
rrosenblum
added a commit
to rrosenblum/rubocop
that referenced
this issue
Aug 30, 2015
bbatsov
added a commit
that referenced
this issue
Aug 31, 2015
[Fix #2154] Fix auto-correct of StringReplacement with a backslash again
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First off, thanks for rubocop!
So if I have a file like this:
rubocop (0.33.0 as well as GitHub
master
) transforms it to this:This isn't good because Ruby sees the second single quote as being escaped and there syntax errors.
Here's the rubocop output:
rubocop -V
:You can also see my
.rubocop.yml
and.rubocop_todo.yml
here:https://gist.github.com/cheerfulstoic/062fa3b79e8397b82c19
The text was updated successfully, but these errors were encountered: