* [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings
@ 2023-03-17 20:27 Julien Olivain
2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Julien Olivain @ 2023-03-17 20:27 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Marcus Folkesson, Julien Olivain, Yann E . MORIN,
Pascal de Bruijn
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(-)
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}"
--
2.40.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: fix shellcheck warnings
2023-03-17 20:27 [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings Julien Olivain
@ 2023-03-17 20:27 ` Julien Olivain
2023-03-18 22:05 ` Thomas Petazzoni via buildroot
2023-03-17 20:27 ` [Buildroot] [PATCH 3/3] utils/config: " Julien Olivain
2023-03-18 22:03 ` [Buildroot] [PATCH 1/3] package/kodi/br-kodi: " Thomas Petazzoni via buildroot
2 siblings, 1 reply; 5+ messages in thread
From: Julien Olivain @ 2023-03-17 20:27 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Marcus Folkesson, Julien Olivain, Yann E . MORIN,
Pascal de Bruijn
When running "make check-package" on a system with shellcheck 0.9.0,
the command fails with output:
make check-package
package/linux-tools/S10hyperv:0: run 'shellcheck' and fix the warnings
...
2 warnings generated
This commit fixes the warnings reported by the command:
shellcheck package/linux-tools/S10hyperv
This commit also fixes the four-space indent by a single tab on the
changed lines. Since this fixes the indentation warnings of
check-package, the Indent exclusion in .checkpackageignore is also
removed.
Fixes:
In package/linux-tools/S10hyperv line 27:
return $ret
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
In package/linux-tools/S10hyperv line 48:
return $ret
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
.checkpackageignore | 2 +-
package/linux-tools/S10hyperv | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.checkpackageignore b/.checkpackageignore
index 405e1c5677..04966a9b06 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -94,7 +94,7 @@ package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch Sob
package/libiio/S99iiod Shellcheck Variables
package/libmad/0001-mips-h-constraint-removal.patch Sob
package/lighttpd/S50lighttpd EmptyLastLine Indent Shellcheck Variables
-package/linux-tools/S10hyperv Indent Variables
+package/linux-tools/S10hyperv Variables
package/linuxptp/S65ptp4l Indent Shellcheck
package/linuxptp/S66phc2sys Indent Shellcheck
package/lirc-tools/S25lircd Indent Variables
diff --git a/package/linux-tools/S10hyperv b/package/linux-tools/S10hyperv
index ec934bc972..32887d1b6c 100644
--- a/package/linux-tools/S10hyperv
+++ b/package/linux-tools/S10hyperv
@@ -24,7 +24,7 @@ start() {
for prog in ${PROGS}; do
start_one "${prog}" || ret=$?
done
- return $ret
+ return "$ret"
}
stop_one() {
@@ -45,7 +45,7 @@ stop() {
for prog in ${PROGS}; do
stop_one "${prog}" || ret=$?
done
- return $ret
+ return "$ret"
}
restart() {
--
2.40.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 3/3] utils/config: fix shellcheck warnings
2023-03-17 20:27 [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings Julien Olivain
2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
@ 2023-03-17 20:27 ` Julien Olivain
2023-03-18 22:03 ` [Buildroot] [PATCH 1/3] package/kodi/br-kodi: " Thomas Petazzoni via buildroot
2 siblings, 0 replies; 5+ messages in thread
From: Julien Olivain @ 2023-03-17 20:27 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Marcus Folkesson, Julien Olivain, Yann E . MORIN,
Pascal de Bruijn
When running "make check-package" on a system with shellcheck 0.9.0,
the command fails with output:
make check-package
utils/config:0: run 'shellcheck' and fix the warnings
...
1 warnings generated
This commit fixes the warnings reported by the command:
shellcheck utils/config
Fixes:
In utils/config line 175:
if grep -q "# ${BR2_PREFIX}$ARG is not set" $FN ; then
^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
In utils/config line 178:
if V="$(grep "^${BR2_PREFIX}$ARG=" $FN)"; then
^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
utils/config | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utils/config b/utils/config
index 5f5e4362e5..9107725a70 100755
--- a/utils/config
+++ b/utils/config
@@ -172,10 +172,10 @@ while [ "$1" != "" ] ; do
;;
--state|-s)
- if grep -q "# ${BR2_PREFIX}$ARG is not set" $FN ; then
+ if grep -q "# ${BR2_PREFIX}$ARG is not set" "$FN" ; then
echo n
else
- if V="$(grep "^${BR2_PREFIX}$ARG=" $FN)"; then
+ if V="$(grep "^${BR2_PREFIX}$ARG=" "$FN")"; then
V="${V/#${BR2_PREFIX}$ARG=/}"
V="${V/#\"/}"
V="${V/%\"/}"
--
2.40.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings
2023-03-17 20:27 [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings Julien Olivain
2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
2023-03-17 20:27 ` [Buildroot] [PATCH 3/3] utils/config: " Julien Olivain
@ 2023-03-18 22:03 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-03-18 22:03 UTC (permalink / raw)
To: Julien Olivain
Cc: Bernd Kuhls, Marcus Folkesson, buildroot, Yann E . MORIN,
Ricardo Martincoski, Pascal de Bruijn
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
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: fix shellcheck warnings
2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
@ 2023-03-18 22:05 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-03-18 22:05 UTC (permalink / raw)
To: Julien Olivain
Cc: Bernd Kuhls, Marcus Folkesson, Pascal de Bruijn, Yann E . MORIN,
buildroot
On Fri, 17 Mar 2023 21:27:23 +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:
>
> make check-package
> package/linux-tools/S10hyperv:0: run 'shellcheck' and fix the warnings
> ...
> 2 warnings generated
>
> This commit fixes the warnings reported by the command:
>
> shellcheck package/linux-tools/S10hyperv
>
> This commit also fixes the four-space indent by a single tab on the
> changed lines. Since this fixes the indentation warnings of
> check-package, the Indent exclusion in .checkpackageignore is also
> removed.
>
> Fixes:
>
> In package/linux-tools/S10hyperv line 27:
> return $ret
> ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
>
> In package/linux-tools/S10hyperv line 48:
> return $ret
> ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> .checkpackageignore | 2 +-
> package/linux-tools/S10hyperv | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-18 22:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 20:27 [Buildroot] [PATCH 1/3] package/kodi/br-kodi: fix shellcheck warnings Julien Olivain
2023-03-17 20:27 ` [Buildroot] [PATCH 2/3] package/linux-tools/S10hyperv: " Julien Olivain
2023-03-18 22:05 ` Thomas Petazzoni via buildroot
2023-03-17 20:27 ` [Buildroot] [PATCH 3/3] utils/config: " Julien Olivain
2023-03-18 22:03 ` [Buildroot] [PATCH 1/3] package/kodi/br-kodi: " Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).