Print environment variables before running linters

This commit is contained in:
Marco Ferrari 2020-10-15 12:38:38 +02:00
parent 4507a8e056
commit df79a85546

View file

@ -412,10 +412,10 @@ GetLinterRules() {
debug " -> Language rules file variable (${LANGUAGE_LINTER_RULES}) value is: ${!LANGUAGE_LINTER_RULES}" debug " -> Language rules file variable (${LANGUAGE_LINTER_RULES}) value is: ${!LANGUAGE_LINTER_RULES}"
if [ -e "${!LANGUAGE_LINTER_RULES}" ]; then if [ -e "${!LANGUAGE_LINTER_RULES}" ]; then
debug " -> Rules file (${!LANGUAGE_LINTER_RULES}) exists." debug " -> ${LANGUAGE_LINTER_RULES} rules file (${!LANGUAGE_LINTER_RULES}) exists."
else else
# Here we expect a rules file, so fail if not available. # Here we expect a rules file, so fail if not available.
fatal " -> Rules file (${!LANGUAGE_LINTER_RULES}) doesn't exists. Terminating..." fatal " -> ${LANGUAGE_LINTER_RULES} rules file (${!LANGUAGE_LINTER_RULES}) doesn't exists. Terminating..."
fi fi
} }
################################################################################ ################################################################################
@ -1206,6 +1206,16 @@ BuildFileList "${VALIDATE_ALL_CODEBASE}"
############### ###############
EDITORCONFIG_FILE_PATH="${GITHUB_WORKSPACE}"/.editorconfig EDITORCONFIG_FILE_PATH="${GITHUB_WORKSPACE}"/.editorconfig
##################################################
# Print ENV before running linters or test cases #
##################################################
debug "--- ENV (before running linters or test cases) ---"
debug "--------------------------------------------------"
PRINTENV=$(printenv | sort)
debug "ENV:"
debug "${PRINTENV}"
debug "---------------------------------------------"
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
debug "Running linter for the ${LANGUAGE} language..." debug "Running linter for the ${LANGUAGE} language..."
VALIDATE_LANGUAGE_VARIABLE_NAME="VALIDATE_${LANGUAGE}" VALIDATE_LANGUAGE_VARIABLE_NAME="VALIDATE_${LANGUAGE}"