Closed KurtMi closed 7 years ago
is there still anything left or is #831 enough ?
I think shellcheck
has some issues, but please wait till #806 is merged or work from my branch.
can we close this issue ?
@KurtMi Can you rerun check bashism?
check bashism is happy now, but shellcheck has some complaints:
In shell_recorder.sh line 27:
if [ -z "@USE_CMAKE_KDB_COMMAND@" ]; then
^-- SC2157: Argument to -z is always false due to literal strings.
Can be ignored!
In shell_recorder.sh line 39:
proto="$@"
^-- SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
In shell_recorder.sh line 58:
command=$(echo $proto | sed "s~\$Mountpoint~${Mountpoint}~g")
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 59:
command=$(echo $command | sed "s~\$File~${DBFile}~g")
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 60:
command=$(echo $command | sed "s~\$Storage~${Storage}~g")
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 61:
command=$(echo $command | sed "s~\$MountArgs~${MountArgs}~g")
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 211:
while read line;
^-- SC2162: read without -r will mangle backslashes.
In shell_recorder.sh line 215:
cmd=$(echo $line|cut -d ' ' -f1)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 218:
Mountpoint=$(echo $line|cut -d ' ' -f2)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 221:
DBFile=$(echo $line|cut -d ' ' -f2)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 222:
if [ "$DBFile" = "File:" -o -z "$DBFile" ]; then
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In shell_recorder.sh line 227:
Storage=$(echo $line|cut -d ' ' -f2)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 230:
MountArgs=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 233:
echo "$(echo $line|cut -d ' ' -f2-)"
^-- SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 236:
DiffType=$(echo $line|cut -d ' ' -f2)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 239:
RETCMP=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 242:
ERRORSCMP=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 245:
WARNINGSCMP=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 248:
STDOUTCMP=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 251:
STDERRCMP=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 254:
DIFFCMP=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 258:
ARG=$(echo $line|cut -d ' ' -f2-)
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 291:
cat "$TMPFILE" | "$KDBCOMMAND" import $Mountpoint 2>/dev/null
^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
^-- SC2086: Double quote to prevent globbing and word splitting.
In shell_recorder.sh line 298:
echo -n "shell_recorder $1 RESULTS: $nbTest test(s) done"
^-- SC2039: In POSIX sh, echo flags are undefined.
Sry, wrong button
@KurtMi can you take a look at #925 ? i have some issues with shellcheck on my system
I let shellcheck and checkbashisms check the
shell_recorder.sh
. I fixed the most, but the following are to hardcore for me.and