Generate report for the warnings

This commit is contained in:
Victor Martinez 2020-07-19 20:26:20 +01:00
parent 1780618634
commit 9d68381696
No known key found for this signature in database
GPG key ID: 4058B656AD58C4F5
2 changed files with 13 additions and 0 deletions

View file

@ -177,6 +177,8 @@ TEST_CASE_FOLDER='.automation/test' # Folder for test c
echo "${TEST_CASE_FOLDER}" > /dev/null 2>&1 || true # Workaround SC2034
DEFAULT_ANSIBLE_DIRECTORY="$GITHUB_WORKSPACE/ansible" # Default Ansible Directory
echo "${DEFAULT_ANSIBLE_DIRECTORY}" > /dev/null 2>&1 || true # Workaround SC2034
WARNING_ARRAY_TEST=() # Array of warning linters that did not have an expected test result.
echo "${WARNING_ARRAY_TEST[*]}" > /dev/null 2>&1 || true # Workaround SC2034
##############
# Format #
@ -784,6 +786,13 @@ 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 #
##################################

View file

@ -504,6 +504,10 @@ function TestCodebase() {
else
echo -e "${NC}${F[Y]}WARN!${NC} No TAP expected file found at:[$EXPECTED_FILE]${NC}"
echo "skipping report assertions"
#####################################
# Append the file type to the array #
#####################################
WARNING_ARRAY_TEST+=("${FILE_TYPE}")
fi
fi