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

Don't check for double quoted string in regexp. #210

Closed
famished-tiger opened this issue May 28, 2013 · 1 comment
Closed

Don't check for double quoted string in regexp. #210

famished-tiger opened this issue May 28, 2013 · 1 comment

Comments

@famished-tiger
Copy link

In the Macros4Cuke gem code, I am scanning parts of a Cucumber scenario. String parameters in Cucumber are usually delimited by double quotes. These parameters are detected by the following regular expression:

/"((?:[^\\"]|\\.)*)"/

Surprisingly Rubocop complains when it finds this regexp with the following message:
Prefer single-quoted strings when you don't need string interpolation or special symbols.

I expected this message to apply only to string literals not regexps.

@bbatsov
Copy link
Collaborator

bbatsov commented May 28, 2013

Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants