Specify version flag for kubeconform

Signed-off-by: Brett Logan <lindluni@github.com>
This commit is contained in:
Brett Logan 2023-01-09 00:10:46 -05:00
parent 03a3c29f60
commit c681b09ebe

View file

@ -75,24 +75,26 @@ BuildLinterVersions() {
elif [[ ${LINTER} == "bash-exec" ]] || [[ ${LINTER} == "gherkin-lint" ]] || [[ ${LINTER} == "asl-validator" ]]; then elif [[ ${LINTER} == "bash-exec" ]] || [[ ${LINTER} == "gherkin-lint" ]] || [[ ${LINTER} == "asl-validator" ]]; then
# Need specific command for Protolint and editorconfig-checker # Need specific command for Protolint and editorconfig-checker
GET_VERSION_CMD="$(echo "--version not supported")" GET_VERSION_CMD="$(echo "--version not supported")"
elif [[ ${LINTER} == "checkstyle" ]] || [[ ${LINTER} == "google-java-format" ]]; then
GET_VERSION_CMD="$(java -jar "/usr/bin/${LINTER}" --version 2>&1)"
elif [[ ${LINTER} == "clippy" ]]; then
GET_VERSION_CMD="$(cargo-clippy --version 2>&1)"
elif [[ ${LINTER} == "editorconfig-checker" ]]; then
GET_VERSION_CMD="$(${LINTER} -version)"
elif [[ ${LINTER} == "kubeconform" ]]; then
GET_VERSION_CMD="$(${LINTER} -v)"
elif [[ ${LINTER} == "lintr" ]]; then elif [[ ${LINTER} == "lintr" ]]; then
# Need specific command for lintr (--slave is deprecated in R 4.0 and replaced by --no-echo) # Need specific command for lintr (--slave is deprecated in R 4.0 and replaced by --no-echo)
GET_VERSION_CMD="$(R --slave -e "r_ver <- R.Version()\$version.string; \ GET_VERSION_CMD="$(R --slave -e "r_ver <- R.Version()\$version.string; \
lintr_ver <- packageVersion('lintr'); \ lintr_ver <- packageVersion('lintr'); \
glue::glue('lintr { lintr_ver } on { r_ver }')")" glue::glue('lintr { lintr_ver } on { r_ver }')")"
elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "gitleaks" ]]; then
GET_VERSION_CMD="$(${LINTER} version)"
elif [[ ${LINTER} == "lua" ]]; then elif [[ ${LINTER} == "lua" ]]; then
# Semi standardversion command # Semi standardversion command
GET_VERSION_CMD="$("${LINTER}" -v 2>&1)" GET_VERSION_CMD="$("${LINTER}" -v 2>&1)"
elif [[ ${LINTER} == "terrascan" ]]; then elif [[ ${LINTER} == "terrascan" ]]; then
GET_VERSION_CMD="$("${LINTER}" version 2>&1)" GET_VERSION_CMD="$("${LINTER}" version 2>&1)"
elif [[ ${LINTER} == "checkstyle" ]] || [[ ${LINTER} == "google-java-format" ]]; then
GET_VERSION_CMD="$(java -jar "/usr/bin/${LINTER}" --version 2>&1)"
elif [[ ${LINTER} == "clippy" ]]; then
GET_VERSION_CMD="$(cargo-clippy --version 2>&1)"
elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "gitleaks" ]]; then
GET_VERSION_CMD="$(${LINTER} version)"
elif [[ ${LINTER} == "editorconfig-checker" ]]; then
GET_VERSION_CMD="$(${LINTER} -version)"
else else
# Standard version command # Standard version command
GET_VERSION_CMD="$("${LINTER}" --version 2>&1)" GET_VERSION_CMD="$("${LINTER}" --version 2>&1)"