sadedot/commonsc.txt

187 lines
6.3 KiB
Plaintext

In scripts/common.sh line 27:
str="${@: -1}"; inputbox=false
^--------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
In scripts/common.sh line 31:
if [ $i -eq $((${argc}-1)) ]; then
^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 36:
((i++))
^-----^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
^-- SC3018 (warning): In POSIX sh, ++ is undefined.
In scripts/common.sh line 42:
width=$((${width}+15))
^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 43:
height=$((${height}+2))
^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 46:
if [ $found = false ]; then
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$found" = false ]; then
In scripts/common.sh line 49:
dialog "${options[@]}"
^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
In scripts/common.sh line 54:
str="${@: -1}"; inputbox=false
^--------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
In scripts/common.sh line 58:
if [ $i -eq $((${argc}-1)) ]; then
^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 63:
((i++))
^-----^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
^-- SC3018 (warning): In POSIX sh, ++ is undefined.
In scripts/common.sh line 69:
width=$((${width}+15))
^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 72:
if [ $found = false ]; then
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$found" = false ]; then
In scripts/common.sh line 76:
whiptail "${options[@]}"
^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
In scripts/common.sh line 81:
options=(); found=false
^-- SC3030 (warning): In POSIX sh, arrays are undefined.
In scripts/common.sh line 84:
options+=("${height}")
^-----^ SC3024 (warning): In POSIX sh, += is undefined.
^-----------^ SC3030 (warning): In POSIX sh, arrays are undefined.
In scripts/common.sh line 85:
options+=("${width}")
^-----^ SC3024 (warning): In POSIX sh, += is undefined.
^----------^ SC3030 (warning): In POSIX sh, arrays are undefined.
In scripts/common.sh line 90:
options+=("${item}")
^-----^ SC3024 (warning): In POSIX sh, += is undefined.
^---------^ SC3030 (warning): In POSIX sh, arrays are undefined.
In scripts/common.sh line 97:
whiptail "${options[@]}"
^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
In scripts/common.sh line 103:
dialog "${options[@]}"
^-----------^ SC3054 (warning): In POSIX sh, array references are undefined.
In scripts/common.sh line 107:
width=$(echo "$1" | wc -c)
^---------------^ SC2000 (style): See if you can use ${#variable} instead.
In scripts/common.sh line 108:
echo $((${width}+8))
^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 113:
for (( i = 0; i < ${#str}; i++ )); do
^-^ SC3005 (warning): In POSIX sh, arithmetic for loops are undefined.
^-- SC3018 (warning): In POSIX sh, ++ is undefined.
In scripts/common.sh line 114:
if [ "${str:$i:1}" = '\' ] && [ "${str:$((i+1)):1}" = 'n' ]; then
^---------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
^-- SC1003 (info): Want to escape a single quote? echo 'This is how it'\''s done'.
^---------------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
In scripts/common.sh line 121:
((count++))
^---------^ SC3006 (warning): In POSIX sh, standalone ((..)) is undefined.
^-- SC3018 (warning): In POSIX sh, ++ is undefined.
In scripts/common.sh line 125:
echo $(($count+8))
^----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 132:
newlines=$(printf "$1" | grep -c $'\n')
^--^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".
^---^ SC3003 (warning): In POSIX sh, $'..' is undefined.
In scripts/common.sh line 133:
chars=$(echo "$1" | wc -c)
^---------------^ SC2000 (style): See if you can use ${#variable} instead.
In scripts/common.sh line 138:
echo $((6+${height}))
^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 142:
newlines=$(printf "$1" | grep -c $'\n')
^--^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".
^---^ SC3003 (warning): In POSIX sh, $'..' is undefined.
In scripts/common.sh line 143:
chars=$(echo "$1" | wc -c)
^---------------^ SC2000 (style): See if you can use ${#variable} instead.
In scripts/common.sh line 148:
echo $((4+${height}))
^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In scripts/common.sh line 152:
export dialogBox=${1}
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
export dialogBox="${1}"
For more information:
https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A...
https://www.shellcheck.net/wiki/SC3003 -- In POSIX sh, $'..' is undefined.
https://www.shellcheck.net/wiki/SC3005 -- In POSIX sh, arithmetic for loops...