shellcheck errors
ilf
ilf at zeromail.org
Mon Dec 19 10:47:13 CET 2016
The awesome tool https://www.shellcheck.net/ ("finds bugs in your shell
scripts") finds 13 suggestions when checking 1.6.5, see attached.
Nothing critical, but still would be cool to have fixed.
Thanks, and keep up the good work!
--
ilf
Über 80 Millionen Deutsche benutzen keine Konsole. Klick dich nicht weg!
-- Eine Initiative des Bundesamtes für Tastaturbenutzung
-------------- next part --------------
In /usr/bin/pass line 86:
local groups="$($GPG --list-config --with-colons | grep "^cfg:group:.*")"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 98:
local group="$(sed -n "s/^cfg:group:$(sed 's/[\/&]/\\&/g' <<<"${GPG_RECIPIENTS[$index]}"):\\(.*\\)\$/\\1/p" <<<"$groups" | head -n 1)"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 101:
unset GPG_RECIPIENTS[$index]
^-- SC2184: Quote arguments to unset so they're not glob expanded.
In /usr/bin/pass line 109:
$GPG -d "${GPG_OPTS[@]}" "$passfile" | $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile_temp" "${GPG_OPTS[@]}" &&
^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
In /usr/bin/pass line 136:
local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null | base64)"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 140:
local now="$(xclip -o -selection "$X_SELECTION" | base64)"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 178:
find "$SECURE_TMPDIR" -type f -exec $SHRED {} +
^-- SC2086: Double quote to prevent globbing and word splitting.
In /usr/bin/pass line 286:
local id_print="$(printf "%s, " "$@")"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 314:
local pass="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | head -n 1)"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 335:
local terms="*$(printf '%s*|*' "$@")"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 344:
[ $? -ne 0 ] && continue
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In /usr/bin/pass line 413:
local tmp_file="$(mktemp -u "$SECURE_TMPDIR/XXXXX")-${path//\//-}.txt"
^-- SC2155: Declare and assign separately to avoid masking return values.
In /usr/bin/pass line 454:
local pass="$(pwgen -s $symbols $length 1)"
^-- SC2155: Declare and assign separately to avoid masking return values.
^-- SC2086: Double quote to prevent globbing and word splitting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20161219/75e39fbb/attachment.asc>
More information about the Password-Store
mailing list