LucasLarson/gunstage

remove double quotation marks where not suggested by ShellCheck

LucasLarson opened this issue · 0 comments

ShellCheck doesn’t care about quoting variable assignments like this one:

IFS="$(printf '\n\t')"

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')"