-
-
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
Allow Style/WordArray not just to be disabled but have alternate EnforcedStyle #1543
Comments
Yes, this makes sense. Same can be done about other similar cops. On Tuesday, December 30, 2014, Loic Nageleisen notifications@github.com
|
So once we have |
Another way to go would be to let the cop enforce array literals when there are |
@jonas054 And presumably we error out if both |
Sorry. I wasn't very clear. What I meant was, that if we're just more strict and always require array literals or require |
Seems to me we should go with the simplest possible option - just add one more style. If people want to use only |
Style/WordArray can only be Enabled: false, have MinSize set or WordRegex defined.
If one wants to enforce word array percent syntax not to be used, even hacking into MinSize (setting it to a huge value) or WordRegex (setting it to something clever that will never match) doesn't work.
Having an EnforcedStyle with values of
array
orpercent
, defaulting to the latter, would be quite useful.The text was updated successfully, but these errors were encountered: