Merge pull request #707 from ferrarimarco/fix-node-modules

Fix list files function typos
This commit is contained in:
Lukas Gravley 2020-09-10 11:21:54 -05:00 committed by GitHub
commit 79b055babe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -773,8 +773,8 @@ function PopulateShellScriptsList() {
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \
-path "*/node_modules" -prune -o \
-path "*/.git" -prune -o \
-path "*/.venv"-prune -o \
-path "*/.rbenv"-prune -o \
-path "*/.venv" -prune -o \
-path "*/.rbenv" -prune -o \
-type f 2>&1)
for FILE in "${LIST_FILES[@]}"; do
if IsValidShellScript "${FILE}"; then

View file

@ -100,8 +100,8 @@ function LintCodebase() {
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \
-path "*/node_modules" -prune -o \
-path "*/.git" -prune -o \
-path "*/.venv"-prune -o \
-path "*/.rbenv"-prune -o \
-path "*/.venv" -prune -o \
-path "*/.rbenv" -prune -o \
-type f -regex "${FILE_EXTENSIONS}" 2>&1)
###########################
@ -180,19 +180,19 @@ function LintCodebase() {
######################################################
# Make sure we don't lint node modules or test cases #
######################################################
if [[ ${DIR_NAME} == *"node_modules"* ]]; then
if [[ ${FILE} == *"node_modules"* ]]; then
# This is a node modules file
continue
elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then
elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then
# This is the test cases, we should always skip
continue
elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then
elif [[ ${FILE} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then
# This is likely the .git folder and shouldn't be parsed
continue
elif [[ ${DIR_NAME} == *".venv"* ]]; then
elif [[ ${FILE} == *".venv"* ]]; then
# This is likely the python virtual environment folder and shouldn't be parsed
continue
elif [[ ${DIR_NAME} == *".rbenv"* ]]; then
elif [[ ${FILE} == *".rbenv"* ]]; then
# This is likely the ruby environment folder and shouldn't be parsed
continue
elif [[ ${FILE_TYPE} == "BASH" ]] && ! IsValidShellScript "${FILE}"; then