From 6040030c8ac8aa95ceb76b1df4b808f61cabccd8 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 2 Sep 2020 09:05:36 -0500 Subject: [PATCH 1/2] Adding more paths to ignore --- lib/buildFileList.sh | 7 ++++++- lib/worker.sh | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index ff03f197..c016b752 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -757,7 +757,12 @@ function PopulateShellScriptsList() { ############################################################################### IFS=$'\n' - mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -path "*/\.git" -prune -o -type f 2>&1) + mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \ + -path "*/node_modules" -prune -o \ + -path "*/\.git" -prune -o \ + -path "*/.venv"-prune -o \ + -path "*/.rbenv"-prune -o \ + -type f 2>&1) for FILE in "${LIST_FILES[@]}"; do if IsValidShellScript "${FILE}"; then debug "Adding ${FILE} to shell script files list" diff --git a/lib/worker.sh b/lib/worker.sh index 35247b75..524a929d 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -95,7 +95,12 @@ function LintCodebase() { ################################# # Get list of all files to lint # ################################# - mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -type f -regex "${FILE_EXTENSIONS}" 2>&1) + mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \ + -path "*/node_modules" -prune -o \ + -path "*/\.git" -prune -o \ + -path "*/.venv"-prune -o \ + -path "*/.rbenv"-prune -o \ + -type f -regex "${FILE_EXTENSIONS}" 2>&1) ########################### # Set IFS back to default # @@ -376,7 +381,13 @@ function TestCodebase() { ################################# # Get list of all files to lint # ################################# - mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}/${TEST_CASE_FOLDER}/${INDIVIDUAL_TEST_FOLDER}" -path "*/node_modules" -prune -o -type f -regex "${FILE_EXTENSIONS}" ! -path "${GITHUB_WORKSPACE}/${TEST_CASE_FOLDER}/ansible/ghe-initialize/*" | sort 2>&1) + mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}/${TEST_CASE_FOLDER}/${INDIVIDUAL_TEST_FOLDER}" \ + -path "*/node_modules" -prune -o \ + -path "*/.venv" -prune -o \ + -path "*/.git" -prune -o \ + -path "*/.rbenv" -prune -o \ + -type f -regex "${FILE_EXTENSIONS}" \ + ! -path "${GITHUB_WORKSPACE}/${TEST_CASE_FOLDER}/ansible/ghe-initialize/*" | sort 2>&1) ######################################## # Prepare context if TAP output format # From a756e4015772c44cd3f28370524c812306986a70 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 2 Sep 2020 09:07:39 -0500 Subject: [PATCH 2/2] typo --- lib/buildFileList.sh | 2 +- lib/worker.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index c016b752..822a1c4a 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -759,7 +759,7 @@ function PopulateShellScriptsList() { mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \ -path "*/node_modules" -prune -o \ - -path "*/\.git" -prune -o \ + -path "*/.git" -prune -o \ -path "*/.venv"-prune -o \ -path "*/.rbenv"-prune -o \ -type f 2>&1) diff --git a/lib/worker.sh b/lib/worker.sh index 524a929d..c6eb4ccd 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -97,7 +97,7 @@ function LintCodebase() { ################################# mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" \ -path "*/node_modules" -prune -o \ - -path "*/\.git" -prune -o \ + -path "*/.git" -prune -o \ -path "*/.venv"-prune -o \ -path "*/.rbenv"-prune -o \ -type f -regex "${FILE_EXTENSIONS}" 2>&1)