mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 12:42:09 -05:00
making cool moves
This commit is contained in:
parent
f74fa431f4
commit
1249a930b7
1 changed files with 50 additions and 33 deletions
|
@ -890,12 +890,12 @@ CallStatusAPI() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
#### Function Footer ###########################################################
|
#### Function Reports ##########################################################
|
||||||
Footer() {
|
Reports() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "The script has completed"
|
echo "Generated reports:"
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -907,6 +907,25 @@ Footer() {
|
||||||
echo "Reports generated in folder ${REPORT_OUTPUT_FOLDER}"
|
echo "Reports generated in folder ${REPORT_OUTPUT_FOLDER}"
|
||||||
fi
|
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 #
|
# Need to clean up the lanuage array of duplicates #
|
||||||
####################################################
|
####################################################
|
||||||
|
@ -946,23 +965,17 @@ Footer() {
|
||||||
fi
|
fi
|
||||||
done
|
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 #
|
# Exit with 0 if errors disabled #
|
||||||
##################################
|
##################################
|
||||||
if [ "${DISABLE_ERRORS}" == "true" ]; then
|
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}"
|
echo -e "${NC}${F[Y]}WARN!${NC} Exiting with exit code:[0] as:[DISABLE_ERRORS] was set to:[${DISABLE_ERRORS}]${NC}"
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# Exit with 1 if errors found #
|
# Exit with 1 if errors found #
|
||||||
###############################
|
###############################
|
||||||
elif
|
|
||||||
# Loop through all languages
|
# Loop through all languages
|
||||||
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
|
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
|
||||||
# build the variable
|
# build the variable
|
||||||
|
@ -974,17 +987,16 @@ Footer() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
|
||||||
#################
|
########################
|
||||||
# Footer prints #
|
# Footer prints Exit 0 #
|
||||||
#################
|
########################
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${NC}${F[G]}All file(s) linted successfully with no errors detected${NC}"
|
echo -e "${NC}${F[G]}All file(s) linted successfully with no errors detected${NC}"
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
# Successful exit
|
# Successful exit
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -1513,6 +1525,11 @@ if [ "${VALIDATE_STATES}" == "true" ]; then
|
||||||
LintCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "${FILE_ARRAY_STATES[@]}"
|
LintCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "${FILE_ARRAY_STATES[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
###########
|
||||||
|
# Reports #
|
||||||
|
###########
|
||||||
|
Reports
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# Footer #
|
# Footer #
|
||||||
##########
|
##########
|
||||||
|
|
Loading…
Reference in a new issue