Closed
Description
Running make syncheck
on Ubuntu 24.04 on the source code shows a lot of shellcheck complains, including:
- SC2086 (info): Double quote to prevent globbing and word splitting.
- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
Remaining output after disabling those two:
$ make syncheck
shellcheck $(shfmt -f .)
In dracut.sh line 1382:
&& dracut_args[$i]="\"${dracut_args[$i]}\""
^-- SC2004 (style): $/${} is unnecessary on arithmetic variables.
In modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh line 12:
[ -n "$_lvm2_thin_device" ] && return $?
^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
In modules.d/95iscsi/iscsiroot.sh line 232:
[ -z "$targets" ] && warn "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && return 1
^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
For more information:
https://www.shellcheck.net/wiki/SC2319 -- This $? refers to a condition, no...
https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti...
make: *** [Makefile:239: syncheck] Fehler 1