From ad9c0081f4b09f8d092d6604038560c2915612a9 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Thu, 10 Sep 2020 12:10:12 +0200 Subject: [PATCH 1/3] Fix list files function typos --- lib/worker.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/worker.sh b/lib/worker.sh index aa00a864..6b4f4319 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -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) ########################### From f432ef2116f77c854463389c42cea65d42e393b9 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 10 Sep 2020 10:25:56 -0500 Subject: [PATCH 2/3] fix spaces --- lib/buildFileList.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index a8452a2f..ff339727 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -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 From b232c5b970e5cb795203037cb6b49d58e26743d6 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 10 Sep 2020 10:34:04 -0500 Subject: [PATCH 3/3] this is the way./.. --- lib/worker.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/worker.sh b/lib/worker.sh index 6b4f4319..b8527921 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -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