From 591688d57d9c7a855652ad97cc20190ac18d267d Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Wed, 19 Jan 2022 11:09:26 -0600 Subject: [PATCH] adding perl and python (#2360) --- lib/functions/detectFiles.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/functions/detectFiles.sh b/lib/functions/detectFiles.sh index 678060e2..b8e77d2f 100755 --- a/lib/functions/detectFiles.sh +++ b/lib/functions/detectFiles.sh @@ -286,6 +286,32 @@ function CheckFileType() { ################################ FILE_ARRAY_JSCPD+=("${FILE}") FILE_ARRAY_RUBY+=("${FILE}") + elif [[ ${GET_FILE_TYPE_CMD} == *"Python script"* ]]; then + if [ "${SUPPRESS_FILE_TYPE_WARN}" == "false" ]; then + ######################### + # It is a Python script # + ######################### + warn "Found Python script without extension:[.py]" + info "Please update file with proper extensions." + fi + ################################ + # Append the file to the array # + ################################ + FILE_ARRAY_JSCPD+=("${FILE}") + FILE_ARRAY_PYTHON+=("${FILE}") + elif [[ ${GET_FILE_TYPE_CMD} == *"Perl script"* ]]; then + if [ "${SUPPRESS_FILE_TYPE_WARN}" == "false" ]; then + ####################### + # It is a Perl script # + ####################### + warn "Found Perl script without extension:[.pl]" + info "Please update file with proper extensions." + fi + ################################ + # Append the file to the array # + ################################ + FILE_ARRAY_JSCPD+=("${FILE}") + FILE_ARRAY_PERL+=("${FILE}") else ############################ # Extension was not found! #