redhat-cop / businessautomation-cop

All examples related to business automation processes such as jbpm, drools, dmn, optaplanner, cloud native kogito(quarkus), quickstart, pipelines, runtimes, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors highlighted by shellcheck for pam-eap-setup

garethahealy opened this issue · comments

@erouvas ; be good to fix or ignore these via the rules provided by shellcheck

find . -type f -name "*.sh" -exec shellcheck --severity=error {} \;

In ./pam-eap-setup/pam-setup.sh line 494:
    for i in ${controllerListAr[@]}; do
             ^--------------------^ SC2068: Double quote array expansions to avoid re-splitting elements.


In ./pam-eap-setup/pam-setup.sh line 886:
summary "Using Controller List :- ${controllerListAr[@]}"
                                  ^--------------------^ SC2145: Argument mixes string and array. Use * or separate argument.


In ./pam-eap-setup/pam-setup.sh line 902:
  for ondx in ${!multiOptions[@]}; do
              ^-----------------^ SC2068: Double quote array expansions to avoid re-splitting elements.


In ./pam-eap-setup/pam-setup.sh line 917:
  for eap_patch_file in `ls $EAP_PATCH_ZIP 2> /dev/null`; do
                        ^-- SC2045: Iterating over ls output is fragile. Use globs.


In ./pam-eap-setup/pam-setup.sh line 1003:
      jvm_memory=${configOptions[jvm_memory]} && [[ ! -z "jvm_memory" ]] && nodeConfig['jvm_memory']="$jvm_memory"
                                                          ^--------^ SC2157: Argument to -z is always false due to literal strings.

highlighted via this PR: