SC2086 Double quote to prevent globbing and word splitting
This one doesn't need the double quotes if it is contained within the
preceding variable expansion.
SC2181 Check exit code directly with e.g. 'if mycmd;', not indirectly with $?
SC2004 $/${} is unnecessary on arithmetic variables
These are straightforward.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
${public_addresses:+-P} ${public_addresses} \
${CTDB_USE_IPV6:+-6} \
${reclock_use_command:+-R} \
${public_addresses:+-P} ${public_addresses} \
${CTDB_USE_IPV6:+-6} \
${reclock_use_command:+-R} \
- ${TEST_SOCKET_WRAPPER_SO_PATH:+-S} ${TEST_SOCKET_WRAPPER_SO_PATH}
+ ${TEST_SOCKET_WRAPPER_SO_PATH:+-S ${TEST_SOCKET_WRAPPER_SO_PATH}}
+ # Burying the above in an if-statement condition reduces readability.
+ # shellcheck disable=SC2181
if [ $? -ne 0 ] ; then
exit 1
fi
local pnn
if [ $? -ne 0 ] ; then
exit 1
fi
local pnn
- for pnn in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
+ for pnn in $(seq 0 $((TEST_LOCAL_DAEMONS - 1))) ; do
if $no_event_scripts ; then
rm -vf "${CTDB_BASE}/events/legacy/"*
fi
if $no_event_scripts ; then
rm -vf "${CTDB_BASE}/events/legacy/"*
fi