Skip to content

Files

Latest commit

 

History

History
28 lines (18 loc) · 551 Bytes

Lint-PercentStringArray.md

File metadata and controls

28 lines (18 loc) · 551 Bytes

Pattern: Unnecessary '' or , in %w

Issue: -

Description

This rule 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.

Examples

# bad

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

%w(foo bar)

Further Reading