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

Style/WordArray ignores MinSize when spaces in the array #10008

Closed
Greg-Myers-SB opened this issue Aug 13, 2021 · 0 comments
Closed

Style/WordArray ignores MinSize when spaces in the array #10008

Greg-Myers-SB opened this issue Aug 13, 2021 · 0 comments

Comments

@Greg-Myers-SB
Copy link

Expected behaviour

Related to #9981

Given a .rubocop.yml of:

Style/WordArray:
  EnforcedStyle: percent
  MinSize: 5

When rubocop runs on the file

%w[my\ word second]

Then rubocop should ignore it because it is too short

Actual behaviour

Rubocop recommends changing to ['first element', 'second']

Steps to reproduce the problem

As above example.

RuboCop version

$ rubocop -V
1.19.0
koic added a commit to koic/rubocop that referenced this issue Aug 13, 2021
…Style/SymbolArray` cops

Fixes rubocop#10007 and rubocop#10008.

This PR tweaks offense message for `Style/WordArray` and `Style/SymbolArray` cops.
It is a clear message suggested by rubocop#10008.
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