chore: remove file_array leftovers (#6018)

Remove the initialization of FILE_ARRAY_xxx variables because worker.sh
dynamically initializes them already.
This commit is contained in:
Marco Ferrari 2024-08-14 17:26:55 +02:00 committed by GitHub
parent 1fa6ba58a8
commit d9bf945fd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 11 deletions

View file

@ -343,7 +343,6 @@ BuildFileArrays() {
elif [ "${FILE_TYPE}" == "coffee" ]; then
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-COFFEESCRIPT"
elif [ "${FILE_TYPE}" == "cs" ]; then
FILE_ARRAY_CSHARP+=("${FILE}")
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CSHARP"
elif [ "${FILE_TYPE}" == "css" ] || [ "${FILE_TYPE}" == "scss" ] ||
[ "${FILE_TYPE}" == "sass" ]; then
@ -413,7 +412,6 @@ BuildFileArrays() {
elif [ "$FILE_TYPE" == "jsonc" ] || [ "$FILE_TYPE" == "json5" ]; then
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSONC"
elif [ "${FILE_TYPE}" == "json" ]; then
FILE_ARRAY_JSON+=("${FILE}")
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSON"
if DetectOpenAPIFile "${FILE}"; then
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-OPENAPI"

View file

@ -37,6 +37,7 @@ function LintCodebase() {
local -n FILE_ARRAY="FILE_ARRAY_${FILE_TYPE}"
local FILE_ARRAY_LANGUAGE_PATH="${FILE_ARRAYS_DIRECTORY_PATH}/file-array-${FILE_TYPE}"
if [[ -e "${FILE_ARRAY_LANGUAGE_PATH}" ]]; then
FILE_ARRAY=()
while read -r FILE; do
if [[ "${TEST_CASE_RUN}" == "true" ]]; then
debug "Ensure that the list files to check for ${FILE_TYPE} doesn't include test cases for other languages"

View file

@ -180,15 +180,6 @@ source /action/lib/globals/linterRules.sh
# shellcheck source=/dev/null
source /action/lib/globals/languages.sh
##########################
# Array of changed files #
##########################
for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do
FILE_ARRAY_VARIABLE_NAME="FILE_ARRAY_${LANGUAGE}"
debug "Initializing ${FILE_ARRAY_VARIABLE_NAME}"
eval "${FILE_ARRAY_VARIABLE_NAME}=()"
done
Header() {
if [[ "${SUPPRESS_POSSUM}" == "false" ]]; then
info "$(/bin/bash /action/lib/functions/possum.sh)"