quote-star-expansion
What it does
Section titled “What it does”Reports an unquoted $* or ${array[*]} in the arguments of a command.
Why it matters
Section titled “Why it matters”Unquoted, it is split on blanks and globbed, and an argument that held a space becomes two. $* is rarely what is wanted.
To fix, write "$@", or "$*" if one string is meant.
Example
Section titled “Example”...cp $* dir ${arr[*]}now=`date`...Configuration
Section titled “Configuration”shell: lint: rules: quote-star-expansion: warn # off, warn (default), errorEnabled by the presets: shell/shellcheck.
Suppress one line with sudsy-disable-next-line quote-star-expansion in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| shellcheck | SC2048 |
partial | Only the arguments of a command. |