-
-
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 WordArray to support a minimum array size #603
Conversation
Coverage decreased (-0.1%) when pulling bd99beb2db8dba43bb0ba519e15b89755e25c7b0 on claco:word-arrsy-max into 62344d4 on bbatsov:master. |
I'm OK with the proposed change. You'll also have to update the changelog and the |
Should I remove the || 0 from the code then? |
Yep. Normally we don't rely on implicit defaults. |
It looks like the specs don't use default.yml. Is that right? So even with a default set, I still have to supply the default in the word array spec itself correct? |
Coverage decreased (-0.1%) when pulling d65d39ae1db26ddd22465057d4654f151163ee03 on claco:word-arrsy-max into 62344d4 on bbatsov:master. |
@claco Yes, that's correct. |
@claco You forgot to update the CHANGELOG.md :-) |
Don't you worry bout that. :-) |
Sometimes it is preferred to use an array for a small number of strings and only force the use of %w %W when the item count it large. This allows the WordArray style to only complain if the number of string elements are over the set minimum.
Allow WordArray to support a minimum array size
Thanks! |
lolz. no clue why my github handle isn't rendering in Changelog. |
Sometimes it is preferred to use an array for a small number of strings
and only force the use of %w %W when the item count it large. This
allows the WordArray style to only complain if the number of string
elements are over the set minimum.
Not entirely sure about the setting name. MinSize seems fitting.