#175 Add shellcheck to CI/CD and fix warnings
Opened by philipmolloy. Modified

A variable is declared as an array and then assigned a string, but only if a conditional is met. And then later on in the case the conditional is not met then the variable is not used as an array.

$ shellcheck kiwi-build 
In kiwi-build line 63:
    kiwibuild_extra_args=( "${kiwibuild_extra_args:+${kiwibuild_extra_args}} ${kiwibuild_iso_extra_args}" )
                                                        ^---------------------^ SC2128 (warning): Expanding an array without an index only gives the first element.
In kiwi-build line 81:
    kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system build --description "${kiwi_description_dir}" --target-dir "${output_dir}-build" "${kiwibuild_extra_args:+${kiwibuild_extra_args}}"
                                                                                                                                                                                                                                        ^---------------------^ SC2128 (warning): Expanding an array without an index only gives the first element.
In kiwi-build line 83:
    kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system boxbuild --box universal --sshfs-sharing -- --description "${kiwi_description_dir}" --target-dir "${output_dir}-build" "${kiwibuild_extra_args:+${kiwibuild_extra_args}}"
                                                                                                                                                                                                                                                                              ^---------------------^ SC2128 (warning): Expanding an array without an index only gives the first element.
For more information:
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...

Metadata