mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 15:41:02 -05:00
Initialize the LANGUAGE_LINTER_RULES value to avoid using leftovers from the previous iteration
This commit is contained in:
parent
888bc7524e
commit
e2f45db57d
1 changed files with 9 additions and 4 deletions
|
@ -371,6 +371,9 @@ GetLinterRules() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
debug "Initializing LANGUAGE_LINTER_RULES value to an empty string..."
|
||||||
|
eval "${LANGUAGE_LINTER_RULES}="
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# Get the file extension #
|
# Get the file extension #
|
||||||
##########################
|
##########################
|
||||||
|
@ -378,10 +381,12 @@ GetLinterRules() {
|
||||||
FILE_NAME=$(basename "${!LANGUAGE_FILE_NAME}" ".${FILE_EXTENSION}")
|
FILE_NAME=$(basename "${!LANGUAGE_FILE_NAME}" ".${FILE_EXTENSION}")
|
||||||
debug "${LANGUAGE_NAME} language rule file (${!LANGUAGE_FILE_NAME}) has ${FILE_NAME} name and ${FILE_EXTENSION} extension"
|
debug "${LANGUAGE_NAME} language rule file (${!LANGUAGE_FILE_NAME}) has ${FILE_NAME} name and ${FILE_EXTENSION} extension"
|
||||||
|
|
||||||
###############################
|
########################################
|
||||||
# Set the secondary file name #
|
# Set the secondary file name and path #
|
||||||
###############################
|
########################################
|
||||||
|
debug "Initializing SECONDARY_FILE_NAME and SECONDARY_LANGUAGE_FILE_PATH..."
|
||||||
SECONDARY_FILE_NAME=''
|
SECONDARY_FILE_NAME=''
|
||||||
|
SECONDARY_LANGUAGE_FILE_PATH=
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
# Check for secondary file name #
|
# Check for secondary file name #
|
||||||
|
@ -428,7 +433,7 @@ GetLinterRules() {
|
||||||
# No user default provided, using the template default #
|
# No user default provided, using the template default #
|
||||||
########################################################
|
########################################################
|
||||||
eval "${LANGUAGE_LINTER_RULES}=${DEFAULT_RULES_LOCATION}/${!LANGUAGE_FILE_NAME}"
|
eval "${LANGUAGE_LINTER_RULES}=${DEFAULT_RULES_LOCATION}/${!LANGUAGE_FILE_NAME}"
|
||||||
debug " -> Codebase does NOT have file:[${LANGUAGE_FILE_PATH}], nor file:[${SECONDARY_LANGUAGE_FILE_PATH}], using Default rules at:[${!LANGUAGE_LINTER_RULES}]"
|
debug " -> Codebase does NOT have file:[${LANGUAGE_FILE_PATH}], nor the file:[${SECONDARY_LANGUAGE_FILE_PATH}], using Default rules at:[${!LANGUAGE_LINTER_RULES}]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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}"
|
||||||
|
|
Loading…
Reference in a new issue