remove double quotation marks where not suggested by ShellCheck
LucasLarson opened this issue · 0 comments
LucasLarson commented
ShellCheck doesn’t care about quoting variable assignments like this one:
Line 20 in 9d7673a
Even when ShellCheck’s
--enable
is set to all
and no matter if --severity
is set to style
, let alone error
, removing the double quotes and running the following has a return value of 0
– c.‑à‑d., which is to say – no warnings or errors:
"$(command -v shellcheck)" \
--enable=all \
--severity=style \
--exclude="" \
--shell=sh \
-- ./bin/git-unstage
An unsurprising warning would be:
In ./bin/git-unstage line 20:
IFS=$(printf '\n\t')
^--------------^
SC2248: Prefer double quoting even when variables don’t contain special characters.Did you mean:
IFS="$(printf '\n\t')"