making cool moves

This commit is contained in:
Lucas Gravley 2020-07-22 14:49:26 -05:00
parent f74fa431f4
commit 1249a930b7

View file

@ -890,12 +890,12 @@ CallStatusAPI() {
fi
}
################################################################################
#### Function Footer ###########################################################
Footer() {
#### Function Reports ##########################################################
Reports() {
echo ""
echo "----------------------------------------------"
echo "----------------------------------------------"
echo "The script has completed"
echo "Generated reports:"
echo "----------------------------------------------"
echo "----------------------------------------------"
echo ""
@ -907,6 +907,25 @@ Footer() {
echo "Reports generated in folder ${REPORT_OUTPUT_FOLDER}"
fi
################################
# Prints for warnings if found #
################################
for TEST in "${WARNING_ARRAY_TEST[@]}"; do
echo -e "${NC}${F[Y]}WARN!${NC} Expected file to compare with was not found for ${TEST}${NC}"
done
}
################################################################################
#### Function Footer ###########################################################
Footer() {
echo ""
echo "----------------------------------------------"
echo "----------------------------------------------"
echo "The script has completed"
echo "----------------------------------------------"
echo "----------------------------------------------"
echo ""
####################################################
# Need to clean up the lanuage array of duplicates #
####################################################
@ -946,23 +965,17 @@ Footer() {
fi
done
################################
# Prints for warnings if found #
################################
for TEST in "${WARNING_ARRAY_TEST[@]}"; do
echo -e "${NC}${F[Y]}WARN!${NC} Expected file to compare with was not found for ${TEST}${NC}"
done
##################################
# Exit with 0 if errors disabled #
##################################
if [ "${DISABLE_ERRORS}" == "true" ]; then
echo -e "${NC}${F[Y]}WARN!${NC} Exiting with exit code:[0] as:[DISABLE_ERRORS] was set to:[${DISABLE_ERRORS}]${NC}"
exit 0
fi
###############################
# Exit with 1 if errors found #
###############################
elif
# Loop through all languages
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
# build the variable
@ -974,17 +987,16 @@ Footer() {
exit 1
fi
done
else
#################
# Footer prints #
#################
########################
# Footer prints Exit 0 #
########################
echo ""
echo -e "${NC}${F[G]}All file(s) linted successfully with no errors detected${NC}"
echo "----------------------------------------------"
echo ""
# Successful exit
exit 0
fi
}
################################################################################
@ -1513,6 +1525,11 @@ if [ "${VALIDATE_STATES}" == "true" ]; then
LintCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "${FILE_ARRAY_STATES[@]}"
fi
###########
# Reports #
###########
Reports
##########
# Footer #
##########