going soooo hard

This commit is contained in:
Lucas Gravley 2020-07-22 14:31:47 -05:00
parent 3c92dcd70b
commit 5001845b7b

View file

@ -46,40 +46,13 @@ function GetValidationInfo() {
################################ ################################
# Convert strings to lowercase # # Convert strings to lowercase #
################################ ################################
VALIDATE_ANSIBLE="${VALIDATE_ANSIBLE,,}" # Loop through all languages
VALIDATE_ARM="${VALIDATE_ARM,,}" for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
VALIDATE_BASH="${VALIDATE_BASH,,}" # build the variable
VALIDATE_CLOJURE="${VALIDATE_CLOJURE,,}" VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}"
VALIDATE_CLOUDFORMATION="${VALIDATE_CLOUDFORMATION,,}" # Set the value of the var to lowercase
VALIDATE_COFFEE="${VALIDATE_COFFEE,,}" eval "${VALIDATE_LANGUAGE}=${!VALIDATE_LANGUAGE,,}"
VALIDATE_CSS="${VALIDATE_CSS,,}" done
VALIDATE_DART="${VALIDATE_DART,,}"
VALIDATE_DOCKER="${VALIDATE_DOCKER,,}"
VALIDATE_EDITORCONFIG="${VALIDATE_EDITORCONFIG,,}"
VALIDATE_ENV="${VALIDATE_ENV,,}"
VALIDATE_GO="${VALIDATE_GO,,}"
VALIDATE_HTML="${VALIDATE_HTML,,}"
VALIDATE_JAVASCRIPT_ES="${VALIDATE_JAVASCRIPT_ES,,}"
VALIDATE_JAVASCRIPT_STANDARD="${VALIDATE_JAVASCRIPT_STANDARD,,}"
VALIDATE_JSON="${VALIDATE_JSON,,}"
VALIDATE_JSX="${VALIDATE_JSX,,}"
VALIDATE_KOTLIN="${VALIDATE_KOTLIN,,}"
VALIDATE_MARKDOWN="${VALIDATE_MARKDOWN,,}"
VALIDATE_OPENAPI="${VALIDATE_OPENAPI,,}"
VALIDATE_PERL="${VALIDATE_PERL,,}"
VALIDATE_PHP="${VALIDATE_PHP,,}"
VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL,,}"
VALIDATE_PROTOBUF="${VALIDATE_PROTOBUF,,}"
VALIDATE_PYTHON="${VALIDATE_PYTHON,,}"
VALIDATE_RAKU="${VALIDATE_RAKU,,}"
VALIDATE_RUBY="${VALIDATE_RUBY,,}"
VALIDATE_STATES="${VALIDATE_STATES,,}"
VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM,,}"
VALIDATE_TSX="${VALIDATE_TSX,,}"
VALIDATE_TYPESCRIPT_ES="${VALIDATE_TYPESCRIPT_ES,,}"
VALIDATE_TYPESCRIPT_STANDARD="${VALIDATE_TYPESCRIPT_STANDARD,,}"
VALIDATE_YAML="${VALIDATE_YAML,,}"
VALIDATE_XML="${VALIDATE_XML,,}"
################################################ ################################################
# Determine if any linters were explicitly set # # Determine if any linters were explicitly set #
@ -90,7 +63,7 @@ function GetValidationInfo() {
# build the variable # build the variable
VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}" VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}"
# Check to see if the variable was set # Check to see if the variable was set
if [ -n ${!VALIDATE_LANGUAGE} ]; then if [ -n "${!VALIDATE_LANGUAGE}" ]; then
# It was set, need to set flag # It was set, need to set flag
ANY_SET="true" ANY_SET="true"
fi fi
@ -107,7 +80,7 @@ function GetValidationInfo() {
# Check if ANY_SET was set # Check if ANY_SET was set
if [[ ${ANY_SET} == "true" ]]; then if [[ ${ANY_SET} == "true" ]]; then
# Check to see if the variable was set # Check to see if the variable was set
if [ -z ${!VALIDATE_LANGUAGE} ]; then if [ -z "${!VALIDATE_LANGUAGE}" ]; then
# Flag was not set, default to false # Flag was not set, default to false
eval "${VALIDATE_LANGUAGE}='false'" eval "${VALIDATE_LANGUAGE}='false'"
fi fi