You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the idea of that cop, but IIC, it wants me to change
format('%.2f', percentage)
# => into
format('%{percentage}.2f', percentage: percentage)
May I suggest that formatting a single parameter shouldn't require such verbosity? Or that there is at least an option to that effect? Current situation sounds to me like a cop that would enforce that all methods use only named parameters, even those with a single argument!
(Yes, I know, I can disable the cop for now...)
The text was updated successfully, but these errors were encountered:
Probably it'd be better if there was a config for the parameter count (e.g. 1,2,3) after which params should be named, but it's also a bit weird when to have special cases only for certain styles - they make the configuration harder to understand.
Tietew
added a commit
to Tietew/rubocop
that referenced
this issue
Oct 16, 2020
…`Style/FormatStringToken` cop.
`MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated`
style token in a format string to be allowed when enforced style is not
`unannotated`.
I like the idea of that cop, but IIC, it wants me to change
May I suggest that formatting a single parameter shouldn't require such verbosity? Or that there is at least an option to that effect? Current situation sounds to me like a cop that would enforce that all methods use only named parameters, even those with a single argument!
(Yes, I know, I can disable the cop for now...)
The text was updated successfully, but these errors were encountered: