-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Syntax error auto-correcting Performance/RegexpMatch
#55
Labels
bug
Something isn't working
Comments
@koic I was trying to fix this error and have a doubt. Both
How can we differentiate between the two? without falling back to source string that is. |
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
May 16, 2020
…Match` Fixes rubocop#55. This PR fixes an incorrect autocorrect for `Performance/RegexpMatch` cop when using `str.=~(/regexp/)`.
8 tasks
koic
added a commit
that referenced
this issue
May 18, 2020
…rmance_regexp_match [Fix #55] Fix an incorrect autocorrect for `Performance/RegexpMatch`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting a syntax error auto-correcting a
Performance/RegexpMatch
violation in the following method definition:Expected behavior
I expect this to autocorrect to:
Actual behavior
The autocorrection has an extra
)
, leading to a syntax error:Steps to reproduce the problem
Put the above snippet into a
foo.rb
file, then:RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:(
rubocop-performance
version is1.3.0
)The text was updated successfully, but these errors were encountered: