Fix bash-exec and terrascan versions

This commit is contained in:
Marco Ferrari 2020-08-29 21:40:08 +02:00
parent 0d849cd5e0
commit b3a980e06f

View file

@ -467,7 +467,7 @@ GetLinterVersions() {
if [[ ${LINTER} == "arm-ttk" ]]; then if [[ ${LINTER} == "arm-ttk" ]]; then
# Need specific command for ARM # Need specific command for ARM
mapfile -t GET_VERSION_CMD < <(grep -iE 'version' "${ARM_TTK_PSD1}" | xargs 2>&1) mapfile -t GET_VERSION_CMD < <(grep -iE 'version' "${ARM_TTK_PSD1}" | xargs 2>&1)
elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "editorconfig-checker" ]]; then elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "editorconfig-checker" ]] || [[ ${LINTER} == "bash-exec" ]]; then
# Need specific command for Protolint and editorconfig-checker # Need specific command for Protolint and editorconfig-checker
mapfile -t GET_VERSION_CMD < <(echo "--version not supported") mapfile -t GET_VERSION_CMD < <(echo "--version not supported")
elif [[ ${LINTER} == "lintr" ]]; then elif [[ ${LINTER} == "lintr" ]]; then
@ -478,6 +478,8 @@ GetLinterVersions() {
elif [[ ${LINTER} == "lua" ]]; then elif [[ ${LINTER} == "lua" ]]; then
# Semi standardversion command # Semi standardversion command
mapfile -t GET_VERSION_CMD < <("${LINTER}" -v 2>&1) mapfile -t GET_VERSION_CMD < <("${LINTER}" -v 2>&1)
elif [[ ${LINTER} == "terrascan" ]]; then
mapfile -t GET_VERSION_CMD < <("${LINTER}" version 2>&1)
else else
# Standard version command # Standard version command
mapfile -t GET_VERSION_CMD < <("${LINTER}" --version 2>&1) mapfile -t GET_VERSION_CMD < <("${LINTER}" --version 2>&1)