Skip to content

Commit ce80cf6

Browse files
authored
fix: centralize file array additions and fix type (#7323)
- Move the logic to add files to file-array-LANGUAGE_NAME for Python, Shell, Perl, Ruby to functions so that we can reuse it when checking file extensions, file names, and file type (returned by GNU file, in case the previous checks didn't match anything). - Fix #7302 by using the AddTo<LANGUAGE_NAME>FileArrays functions instead of repeating commands to add files to file arrays. - Fix file type detection issues for shell ksh, dash, and POSIX shell scripts. - Add test for the CheckFileType function - Move the logic to test for valid shell scripts back in BuildFileArrays to avoid calling GNU file as the very first check to run against each file Fix #7302
1 parent ab58437 commit ce80cf6

4 files changed

Lines changed: 355 additions & 164 deletions

File tree

docs/add-new-linter.md

Lines changed: 68 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,20 @@ filename:
233233
Provide the logic to populate the list of files or directories to examine in
234234
`lib/functions/buildFileList.sh`:
235235

236-
- _File extension check_: If the new tool supports only specific files and you
237-
can select the files by looking at their extension:
236+
- _File extension or name check_: If the new tool supports only specific files
237+
and you can select the files by looking at their extension or their name:
238238
1. Add an `elif` clause in the `BuildFileArrays` function to select files by
239-
extension. Example:
239+
extension. To build the new check, you can use the following variables:
240+
- `FILE_TYPE`: file extension
241+
- `BASE_FILE`: name of the file
242+
- `FILE_DIR_NAME`: path to the directory containing the file
243+
244+
Example:
240245

241-
```bash
242-
elif [ "${FILE_TYPE}" == "ext" ]; then
243-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-<LANGUAGE_NAME>"
244-
```
246+
```bash
247+
elif [ "${FILE_TYPE}" == "ext" ]; then
248+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-<LANGUAGE_NAME>"
249+
```
245250

246251
- _File contents check_: If the tool supports only specific files and you need
247252
to examine the file contents to check if the new tool supports them:
@@ -250,10 +255,10 @@ Provide the logic to populate the list of files or directories to examine in
250255
1. Add an `elif` clause in the `BuildFileArrays` function to select files by
251256
extension. Example:
252257

253-
```bash
254-
elif DetectCloudFormationFile "${FILE}"; then
255-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CLOUDFORMATION"
256-
```
258+
```bash
259+
elif DetectCloudFormationFile "${FILE}"; then
260+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CLOUDFORMATION"
261+
```
257262

258263
- _Entire workspace check_: If the tool supports its own file detection logic,
259264
and supports customizing that logic using a configuration file, do the
@@ -276,8 +281,58 @@ YAML files (so files with the `.yml` and `.yaml` extensions).
276281

277282
### Fallback
278283

279-
The `CheckFileType` function in `lib/functions/detectFiles.sh` attempts to get
280-
the file type in case no other case matched.
284+
The `CheckFileType` function in `lib/functions/buildFileList.sh` attempts to get
285+
the file type in case no other case matched by using the GNU `file` utility. If
286+
you need this fallback, do the following:
287+
288+
1. Create a new function in `lib/functions/buildFileList.sh` named
289+
`AddTo<Language name>FileArrays` and move the logic to add files to the file
290+
array for the new language there, where `<Language name>` is the lowercase
291+
`<LANGUAGE_NAME>`. Example:
292+
293+
```bash
294+
AddToPythonFileArrays() {
295+
local FILE="${1}"
296+
297+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_BLACK"
298+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_FLAKE8"
299+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_ISORT"
300+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_PYLINT"
301+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_MYPY"
302+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_RUFF"
303+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_RUFF_FORMAT"
304+
}
305+
```
306+
307+
1. Export the new `AddTo<Language name>FileArrays` function by adding an
308+
`export -f` command at the bottom of the `lib/functions/buildFileList.sh`
309+
file. Example:
310+
311+
```bash
312+
export -f AddToPythonFileArrays
313+
```
314+
315+
1. Refactor the file extension or name check to use the mew
316+
`AddTo<Language name>FileArrays` instead of adding files to the file arrays
317+
directly. Example:
318+
319+
```bash
320+
elif [ "${FILE_TYPE}" == "py" ]; then
321+
AddToPythonFileArrays "${FILE}"
322+
```
323+
324+
1. Extend the `CheckFileType` function to match the output of the `file` command
325+
for your file type. Example:
326+
327+
```bash
328+
*"Python script"*)
329+
FILE_TYPE_MESSAGE="Found Python script without extension: ${FILE}"
330+
AddToPythonFileArrays "${FILE}"
331+
;;
332+
```
333+
334+
1. Update the `CheckFileTypeTest` test function function in
335+
`test/lib/buildFileListTest.sh` to cover the new case.
281336

282337
## Get the tool version
283338

lib/functions/buildFileList.sh

Lines changed: 145 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,94 @@ function BuildFileList() {
258258
info "Successfully gathered list of files..."
259259
}
260260

261+
AddToPythonFileArrays() {
262+
local FILE="${1}"
263+
264+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_BLACK"
265+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_FLAKE8"
266+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_ISORT"
267+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_PYLINT"
268+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_MYPY"
269+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_RUFF"
270+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_RUFF_FORMAT"
271+
}
272+
273+
AddToShellFileArrays() {
274+
local FILE="${1}"
275+
276+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BASH"
277+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BASH_EXEC"
278+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-SHELL_SHFMT"
279+
}
280+
281+
AddToPerlFileArrays() {
282+
local FILE="${1}"
283+
284+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PERL"
285+
}
286+
287+
AddToRubyFileArrays() {
288+
local FILE="${1}"
289+
290+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RUBY"
291+
}
292+
293+
CheckFileType() {
294+
local FILE
295+
FILE="$1"
296+
297+
local GET_FILE_TYPE_CMD
298+
if ! GET_FILE_TYPE_CMD="$(file --brief "${FILE}" 2>&1)"; then
299+
error "Error while checking file type: ${GET_FILE_TYPE_CMD}"
300+
return 1
301+
fi
302+
debug "Detected file type for ${FILE}: ${GET_FILE_TYPE_CMD}"
303+
304+
local FILE_TYPE_MESSAGE
305+
306+
case "${GET_FILE_TYPE_CMD}" in
307+
*"Python script"*)
308+
FILE_TYPE_MESSAGE="Found Python script without extension: ${FILE}"
309+
AddToPythonFileArrays "${FILE}"
310+
;;
311+
*"Perl script"*)
312+
FILE_TYPE_MESSAGE="Found Perl script without extension: ${FILE}"
313+
AddToPerlFileArrays "${FILE}"
314+
;;
315+
*"Ruby script"*)
316+
FILE_TYPE_MESSAGE="Found Ruby file without extension: ${FILE}"
317+
AddToRubyFileArrays "${FILE}"
318+
;;
319+
*"POSIX shell script"* | *"Bourne-Again shell script"* | *"Dash shell script"* | *"Korn shell script"* | *"sh script"*)
320+
FILE_TYPE_MESSAGE="Found a Shell script without extension: ${FILE}"
321+
AddToShellFileArrays "${FILE}"
322+
;;
323+
*)
324+
FILE_TYPE_MESSAGE="Failed to get file type for: ${FILE}. Output: ${GET_FILE_TYPE_CMD}"
325+
return 1
326+
;;
327+
esac
328+
329+
if [ "${SUPPRESS_FILE_TYPE_WARN}" == "false" ]; then
330+
warn "${FILE_TYPE_MESSAGE}"
331+
else
332+
debug "${FILE_TYPE_MESSAGE}"
333+
fi
334+
}
335+
261336
BuildFileArrays() {
262337
local -a RAW_FILE_ARRAY
263338
RAW_FILE_ARRAY=("$@")
264339

265340
debug "Categorizing the following files: ${RAW_FILE_ARRAY[*]}"
266341

342+
RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY=()
343+
if [[ -n "${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES:-}" ]]; then
344+
# See https://docs.renovatebot.com/config-presets/
345+
IFS="," read -r -a RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY <<<"${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES}"
346+
debug "Initialized RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY with: ${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY[*]}"
347+
fi
348+
267349
for FILE in "${RAW_FILE_ARRAY[@]}"; do
268350
if [[ -z "${FILE:-""}" ]]; then
269351
error "FILE is empty."
@@ -390,66 +472,42 @@ BuildFileArrays() {
390472
fi
391473

392474
# Handle test cases for tools that lint the entire workspace
393-
394-
# Handle BIOME_FORMAT test cases
395-
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ "${FILE}" =~ .*${DEFAULT_BIOME_FORMAT_TEST_CASE_DIRECTORY}.* ]] && [[ -d "${FILE}" ]]; then
396-
debug "${FILE} is a test case for BIOME_FORMAT. Adding it to the list of items to lint with BIOME_FORMAT"
397-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BIOME_FORMAT"
398-
fi
399-
400-
# Handle BIOME_LINT test cases
401-
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ "${FILE}" =~ .*${DEFAULT_BIOME_LINT_TEST_CASE_DIRECTORY}.* ]] && [[ -d "${FILE}" ]]; then
402-
debug "${FILE} is a test case for BIOME_LINT. Adding it to the list of items to lint with BIOME_LINT"
403-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BIOME_LINT"
404-
fi
405-
406-
# Handle Commitlint test cases
407-
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ "${FILE}" =~ .*${DEFAULT_GIT_COMMITLINT_TEST_CASE_DIRECTORY}.* ]] && [[ -d "${FILE}" ]]; then
408-
debug "${FILE} is a test case for Commitlint. Adding it to the list of items to lint with Commitlint"
409-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GIT_COMMITLINT"
410-
fi
411-
412-
# Handle JSCPD test cases
413-
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ "${FILE}" =~ .*${DEFAULT_JSCPD_TEST_CASE_DIRECTORY}.* ]] && [[ -d "${FILE}" ]]; then
414-
debug "${FILE} is a test case for JSCPD. Adding it to the list of items to lint with JSCPD"
415-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSCPD"
416-
fi
417-
418-
# Handle pre-commit test cases
419-
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ "${FILE}" =~ .*${DEFAULT_PRE_COMMIT_TEST_CASE_DIRECTORY}.* ]] && [[ -d "${FILE}" ]]; then
420-
debug "${FILE} is a test case for pre-commit. Adding it to the list of items to lint with pre-commit"
421-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PRE_COMMIT"
422-
fi
423-
424-
# Handle Trivy test cases
425-
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ "${FILE}" =~ .*${DEFAULT_TRIVY_TEST_CASE_DIRECTORY}.* ]] && [[ -d "${FILE}" ]]; then
426-
debug "${FILE} is a test case for Trivy. Adding it to the list of items to lint with Trivy"
427-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-TRIVY"
428-
fi
429-
430-
# Select files by extension or content
431-
432-
# See https://docs.renovatebot.com/configuration-options/
433-
if [[ "${BASE_FILE}" =~ renovate.json5? ]] ||
434-
[ "${BASE_FILE}" == ".renovaterc" ] || [[ "${BASE_FILE}" =~ .renovaterc.json5? ]]; then
435-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RENOVATE"
475+
if [[ "${TEST_CASE_RUN}" == "true" ]] && [[ -d "${FILE}" ]]; then
476+
# Handle BIOME_FORMAT test cases
477+
if [[ "${FILE}" =~ .*${DEFAULT_BIOME_FORMAT_TEST_CASE_DIRECTORY}.* ]]; then
478+
debug "${FILE} is a test case for BIOME_FORMAT. Adding it to the list of items to lint with BIOME_FORMAT"
479+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BIOME_FORMAT"
480+
# Handle BIOME_LINT test cases
481+
elif [[ "${FILE}" =~ .*${DEFAULT_BIOME_LINT_TEST_CASE_DIRECTORY}.* ]]; then
482+
debug "${FILE} is a test case for BIOME_LINT. Adding it to the list of items to lint with BIOME_LINT"
483+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BIOME_LINT"
484+
# Handle Commitlint test cases
485+
elif [[ "${FILE}" =~ .*${DEFAULT_GIT_COMMITLINT_TEST_CASE_DIRECTORY}.* ]]; then
486+
debug "${FILE} is a test case for Commitlint. Adding it to the list of items to lint with Commitlint"
487+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-GIT_COMMITLINT"
488+
# Handle JSCPD test cases
489+
elif [[ "${FILE}" =~ .*${DEFAULT_JSCPD_TEST_CASE_DIRECTORY}.* ]]; then
490+
debug "${FILE} is a test case for JSCPD. Adding it to the list of items to lint with JSCPD"
491+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSCPD"
492+
# Handle pre-commit test cases
493+
elif [[ "${FILE}" =~ .*${DEFAULT_PRE_COMMIT_TEST_CASE_DIRECTORY}.* ]]; then
494+
debug "${FILE} is a test case for pre-commit. Adding it to the list of items to lint with pre-commit"
495+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PRE_COMMIT"
496+
# Handle Trivy test cases
497+
elif [[ "${FILE}" =~ .*${DEFAULT_TRIVY_TEST_CASE_DIRECTORY}.* ]]; then
498+
debug "${FILE} is a test case for Trivy. Adding it to the list of items to lint with Trivy"
499+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-TRIVY"
500+
fi
436501
fi
437502

438-
if [[ -n "${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES:-}" ]]; then
439-
# See https://docs.renovatebot.com/config-presets/
440-
IFS="," read -r -a RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY <<<"${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES}"
441-
for file_name in "${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY[@]}"; do
442-
if [ "${BASE_FILE}" == "${file_name}" ]; then
443-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RENOVATE"
444-
break
445-
fi
446-
done
447-
fi
503+
# Select files by extension or file name
448504

449-
if IsValidShellScript "${FILE}"; then
450-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BASH"
451-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-BASH_EXEC"
452-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-SHELL_SHFMT"
505+
if [ "${FILE_TYPE}" == "sh" ] ||
506+
[ "${FILE_TYPE}" == "bash" ] ||
507+
[ "${FILE_TYPE}" == "bats" ] ||
508+
[ "${FILE_TYPE}" == "dash" ] ||
509+
[ "${FILE_TYPE}" == "ksh" ]; then
510+
AddToShellFileArrays "${FILE}"
453511
elif [ "${FILE_TYPE}" == "clj" ] || [ "${FILE_TYPE}" == "cljs" ] ||
454512
[ "${FILE_TYPE}" == "cljc" ] || [ "${FILE_TYPE}" == "edn" ]; then
455513
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-CLOJURE"
@@ -605,7 +663,7 @@ BuildFileArrays() {
605663
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PHP_PSALM"
606664
elif [ "${FILE_TYPE}" == "pl" ] || [ "${FILE_TYPE}" == "pm" ] ||
607665
[ "${FILE_TYPE}" == "t" ]; then
608-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PERL"
666+
AddToPerlFileArrays "${FILE}"
609667
elif [ "${FILE_TYPE}" == "ps1" ] ||
610668
[ "${FILE_TYPE}" == "psm1" ] ||
611669
[ "${FILE_TYPE}" == "psd1" ] ||
@@ -617,17 +675,11 @@ BuildFileArrays() {
617675
elif [ "${FILE_TYPE}" == "proto" ]; then
618676
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PROTOBUF"
619677
elif [ "${FILE_TYPE}" == "py" ]; then
620-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_BLACK"
621-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_FLAKE8"
622-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_ISORT"
623-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_PYLINT"
624-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_MYPY"
625-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_RUFF"
626-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-PYTHON_RUFF_FORMAT"
678+
AddToPythonFileArrays "${FILE}"
627679
elif [ "${FILE_TYPE}" == "r" ] || [ "${FILE_TYPE}" == "rmd" ]; then
628680
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-R"
629681
elif [ "${FILE_TYPE}" == "rb" ]; then
630-
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RUBY"
682+
AddToRubyFileArrays "${FILE}"
631683
elif [ "${FILE_TYPE}" == "rs" ]; then
632684
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RUST_2015"
633685
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RUST_2018"
@@ -713,11 +765,36 @@ BuildFileArrays() {
713765
if DetectKubernetesFile "${FILE}"; then
714766
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-KUBERNETES_KUBECONFORM"
715767
fi
768+
# See https://docs.renovatebot.com/configuration-options/
769+
elif [[ "${BASE_FILE}" =~ renovate.json5? ]] ||
770+
[ "${BASE_FILE}" == ".renovaterc" ] || [[ "${BASE_FILE}" =~ .renovaterc.json5? ]]; then
771+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RENOVATE"
716772
else
717-
CheckFileType "${FILE}"
773+
# Fallback option: look at the file contents
774+
if ! CheckFileType "${FILE}"; then
775+
debug "Failed to get file type for ${FILE}"
776+
fi
777+
fi
778+
779+
# Handle the special case of Renovate shareable config presets
780+
# Ref: https://docs.renovatebot.com/config-presets/
781+
if [[ "$FILE_TYPE" == "json" ]] ||
782+
[[ "$FILE_TYPE" == "json5" ]] ||
783+
[[ "$FILE_TYPE" == "jsonc" ]]; then
784+
for file_name in "${RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES_ARRAY[@]}"; do
785+
if [ "${BASE_FILE}" == "${file_name}" ]; then
786+
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-RENOVATE"
787+
break
788+
fi
789+
done
718790
fi
719791
done
720792
}
721793

722-
# We need this for parallel
794+
# We need so subprocesses (such as GNU Parallel) have access to these functions
795+
export -f AddToPythonFileArrays
796+
export -f AddToShellFileArrays
797+
export -f AddToPerlFileArrays
798+
export -f AddToRubyFileArrays
723799
export -f BuildFileArrays
800+
export -f CheckFileType

0 commit comments

Comments
 (0)