ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.ttJ6iJdUOw and /tmp/tmp.lmiMhFJmsI Tree base: 42f3e642eb28 ("gue: Fix skb memleak with inner IP protocol 0.") Now at: b92e14137080 ("tools: ynl: Specify --no-line-number in ynl-regen.sh.") ====== Checking before the patch ====== Checking tools/net/ynl/ynl-regen.sh - fc86b86dcac004fe57e5c7df4892dccdfa538f9a590984a885f437cb04fc35e9 In ynl-regen.sh line 4: TOOL=$(dirname $(realpath $0))/pyynl/ynl_gen_c.py ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: TOOL=$(dirname $(realpath "$0"))/pyynl/ynl_gen_c.py In ynl-regen.sh line 17: KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath $0))))) ^-- SC2046 (warning): Quote this to prevent word splitting. ^-- SC2046 (warning): Quote this to prevent word splitting. ^-----------------------^ SC2046 (warning): Quote this to prevent word splitting. ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath "$0"))))) In ynl-regen.sh line 18: pushd ${search:-$KDIR} >>/dev/null ^-- SC2164 (warning): Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails. ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: pushd "${search:-$KDIR}" >>/dev/null || exit In ynl-regen.sh line 24: params=( $(git grep -B1 -h '/\* YNL-GEN' $f | sed 's@/\*\(.*\)\*/@\1@') ) ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting). ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: params=( $(git grep -B1 -h '/\* YNL-GEN' "$f" | sed 's@/\*\(.*\)\*/@\1@') ) In ynl-regen.sh line 25: args=$(sed -n 's@/\* YNL-ARG \(.*\) \*/@\1@p' $f) ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: args=$(sed -n 's@/\* YNL-ARG \(.*\) \*/@\1@p' "$f") In ynl-regen.sh line 27: if [ $f -nt ${params[0]} -a -z "$force" ]; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Did you mean: if [ "$f" -nt "${params[0]}" -a -z "$force" ]; then In ynl-regen.sh line 33: $TOOL --cmp-out --mode ${params[2]} --${params[3]} \ ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $TOOL --cmp-out --mode "${params[2]}" --"${params[3]}" \ In ynl-regen.sh line 34: --spec $KDIR/${params[0]} $args -o $f ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --spec "$KDIR"/"${params[0]}" "$args" -o "$f" In ynl-regen.sh line 37: popd >>/dev/null ^--------------^ SC2164 (warning): Use 'popd ... || exit' or 'popd ... || return' in case popd fails. Did you mean: popd >>/dev/null || exit For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2164 -- Use 'popd ... || exit' or 'popd .... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q... ====== Checking the tree with the patch ====== Checking tools/net/ynl/ynl-regen.sh - fc86b86dcac004fe57e5c7df4892dccdfa538f9a590984a885f437cb04fc35e9 In ynl-regen.sh line 4: TOOL=$(dirname $(realpath $0))/pyynl/ynl_gen_c.py ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: TOOL=$(dirname $(realpath "$0"))/pyynl/ynl_gen_c.py In ynl-regen.sh line 17: KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath $0))))) ^-- SC2046 (warning): Quote this to prevent word splitting. ^-- SC2046 (warning): Quote this to prevent word splitting. ^-----------------------^ SC2046 (warning): Quote this to prevent word splitting. ^------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: KDIR=$(dirname $(dirname $(dirname $(dirname $(realpath "$0"))))) In ynl-regen.sh line 18: pushd ${search:-$KDIR} >>/dev/null ^-- SC2164 (warning): Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails. ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: pushd "${search:-$KDIR}" >>/dev/null || exit In ynl-regen.sh line 24: params=( $(git grep --no-line-number -B1 -h '/\* YNL-GEN' $f | sed 's@/\*\(.*\)\*/@\1@') ) ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting). ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: params=( $(git grep --no-line-number -B1 -h '/\* YNL-GEN' "$f" | sed 's@/\*\(.*\)\*/@\1@') ) In ynl-regen.sh line 25: args=$(sed -n 's@/\* YNL-ARG \(.*\) \*/@\1@p' $f) ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: args=$(sed -n 's@/\* YNL-ARG \(.*\) \*/@\1@p' "$f") In ynl-regen.sh line 27: if [ $f -nt ${params[0]} -a -z "$force" ]; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Did you mean: if [ "$f" -nt "${params[0]}" -a -z "$force" ]; then In ynl-regen.sh line 33: $TOOL --cmp-out --mode ${params[2]} --${params[3]} \ ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $TOOL --cmp-out --mode "${params[2]}" --"${params[3]}" \ In ynl-regen.sh line 34: --spec $KDIR/${params[0]} $args -o $f ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --spec "$KDIR"/"${params[0]}" "$args" -o "$f" In ynl-regen.sh line 37: popd >>/dev/null ^--------------^ SC2164 (warning): Use 'popd ... || exit' or 'popd ... || return' in case popd fails. Did you mean: popd >>/dev/null || exit For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2164 -- Use 'popd ... || exit' or 'popd .... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q...