Skip to content

Commit

Permalink
Merge pull request super-linter#663 from github/CleanPaths
Browse files Browse the repository at this point in the history
Adding more paths to ignore
  • Loading branch information
admiralAwkbar committed Sep 2, 2020
2 parents c155985 + a756e40 commit 8b51678
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/buildFileList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 13 additions & 2 deletions lib/worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down Expand Up @@ -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 #
Expand Down

0 comments on commit 8b51678

Please sign in to comment.