Merge pull request #663 from github/CleanPaths

Adding more paths to ignore
This commit is contained in:
Lukas Gravley 2020-09-02 09:21:25 -05:00 committed by GitHub
commit 8b516782d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View file

@ -757,7 +757,12 @@ function PopulateShellScriptsList() {
############################################################################### ###############################################################################
IFS=$'\n' 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 for FILE in "${LIST_FILES[@]}"; do
if IsValidShellScript "${FILE}"; then if IsValidShellScript "${FILE}"; then
debug "Adding ${FILE} to shell script files list" debug "Adding ${FILE} to shell script files list"

View file

@ -95,7 +95,12 @@ function LintCodebase() {
################################# #################################
# Get list of all files to lint # # 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 # # Set IFS back to default #
@ -376,7 +381,13 @@ function TestCodebase() {
################################# #################################
# Get list of all files to lint # # 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 # # Prepare context if TAP output format #