class RuboCop::Cop::Lint::PercentStringArray

Checks for quotes and commas in %w, e.g. ‘%w(’foo’, “bar”)‘

It is more likely that the additional characters are unintended (for example, mistranslating an array of literals to percent string notation) rather than meant to be part of the resulting strings.

@safety

The cop is unsafe because the correction changes the values in the array
and that might have been done purposely.

[source,ruby]
----
%w('foo', "bar") #=> ["'foo',", '"bar"']
%w(foo bar)      #=> ['foo', 'bar']
----

@example

# bad
%w('foo', "bar")

# good
%w(foo bar)