Message ID | 20230317202724.79207-1-ju.o@free.fr |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/3] package/kodi/br-kodi: fix shellcheck warnings | expand |
Hello Julien, On Fri, 17 Mar 2023 21:27:22 +0100 Julien Olivain <ju.o@free.fr> wrote: > When running "make check-package" on a system with shellcheck 0.9.0, > the command fails with output: Thing is our "reference" shellcheck version is 0.7.1, from our reference Docker container: $ ./utils/docker-run shellcheck --version ShellCheck - shell script analysis tool version: 0.7.1 license: GNU General Public License, version 3 website: https://www.shellcheck.net Since shellcheck warnings vary between versions, I'm not sure we want to handle warnings from all possible shellcheck versions. At least I remember that when Ricardo added the ignore list of warnings, he did mention that it would be important to settle on a specific version of shellcheck. Of course, I'm all open to updating the Docker container to use a newer version of shellcheck, but what I meant is that we should consistently use the same version. Thomas
diff --git a/package/kodi/br-kodi b/package/kodi/br-kodi index 83d4d4e5ac..bc64515246 100755 --- a/package/kodi/br-kodi +++ b/package/kodi/br-kodi @@ -7,6 +7,7 @@ shift # In case someone asked we terminate, just kill # the Kodi process +# shellcheck disable=SC2317 # Don't warn about unreachable commands trap_kill() { LOOP=0 killall "${KODI##*/}" @@ -33,4 +34,4 @@ while [ ${LOOP} -eq 1 ]; do ;; esac done -exit ${ret} +exit "${ret}"
When running "make check-package" on a system with shellcheck 0.9.0, the command fails with output: make check-package package/kodi/br-kodi:0: run 'shellcheck' and fix the warnings ... 3 warnings generated This commit fixes the warnings reported by the command: shellcheck package/kodi/br-kodi Fixes: In package/kodi/br-kodi line 11: LOOP=0 ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In package/kodi/br-kodi line 12: killall "${KODI##*/}" ^-------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In package/kodi/br-kodi line 36: exit ${ret} ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Signed-off-by: Julien Olivain <ju.o@free.fr> --- package/kodi/br-kodi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)