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

Auto correct for Style/WordArray improvement #1352

Closed
rousisk opened this issue Sep 26, 2014 · 1 comment · Fixed by #1371
Closed

Auto correct for Style/WordArray improvement #1352

rousisk opened this issue Sep 26, 2014 · 1 comment · Fixed by #1371

Comments

@rousisk
Copy link

rousisk commented Sep 26, 2014

Currently (0.26.1), this snippet

words_array = ['words', 'here']

emails_array = ['an@email.tld', 'another@email.too']

will be auto corrected to:

words_array = %w(words here)

emails_array = ['an@email.tld', 'another@email.too']

while ideally it would result to

words_array = %w(words here)

emails_array = %w(an@email.tld another@email.too)
@bquorning
Copy link
Contributor

Proposed fix in PR #1371.

bquorning added a commit to bquorning/rubocop that referenced this issue Oct 10, 2014
The Style/WordArray cop can now be configured with the WordCharacters
option. Its value must be a Regexp character class (as a string).
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

Successfully merging a pull request may close this issue.

2 participants