mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-26 08:01:03 -05:00
Skip node_modules from finds
This commit is contained in:
parent
0e03102b3e
commit
a186477c8b
2 changed files with 6 additions and 6 deletions
|
@ -1261,7 +1261,7 @@ if [ "${VALIDATE_ARM}" == "true" ]; then
|
|||
###############################################################################
|
||||
IFS=$'\n'
|
||||
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(json\)\$" 2>&1)
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(json\)\$" 2>&1)
|
||||
for FILE in "${LIST_FILES[@]}"; do
|
||||
if DetectARMFile "${FILE}"; then
|
||||
FILE_ARRAY_ARM+=("${FILE}")
|
||||
|
@ -1303,7 +1303,7 @@ if [ "${VALIDATE_CLOUDFORMATION}" == "true" ]; then
|
|||
###############################################################################
|
||||
IFS=$'\n'
|
||||
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||
for FILE in "${LIST_FILES[@]}"; do
|
||||
if DetectCloudFormationFile "${FILE}"; then
|
||||
FILE_ARRAY_CLOUDFORMATION+=("${FILE}")
|
||||
|
@ -1557,7 +1557,7 @@ if [ "${VALIDATE_OPENAPI}" == "true" ]; then
|
|||
###############################################################################
|
||||
IFS=$'\n'
|
||||
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1)
|
||||
for FILE in "${LIST_FILES[@]}"; do
|
||||
if DetectOpenAPIFile "${FILE}"; then
|
||||
FILE_ARRAY_OPENAPI+=("${FILE}")
|
||||
|
@ -1709,7 +1709,7 @@ if [ "${VALIDATE_STATES}" == "true" ]; then
|
|||
###############################################################################
|
||||
IFS=$'\n'
|
||||
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(json\)\$" 2>&1)
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -type f -regex ".*\.\(json\)\$" 2>&1)
|
||||
for FILE in "${LIST_FILES[@]}"; do
|
||||
if DetectAWSStatesFIle "${FILE}"; then
|
||||
FILE_ARRAY_STATES+=("${FILE}")
|
||||
|
|
|
@ -85,7 +85,7 @@ function LintCodebase() {
|
|||
#################################
|
||||
# Get list of all files to lint #
|
||||
#################################
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex "${FILE_EXTENSIONS}" 2>&1)
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -path "*/node_modules" -prune -o -type f -regex "${FILE_EXTENSIONS}" 2>&1)
|
||||
|
||||
###########################
|
||||
# Set IFS back to default #
|
||||
|
@ -312,7 +312,7 @@ function TestCodebase() {
|
|||
#################################
|
||||
# Get list of all files to lint #
|
||||
#################################
|
||||
mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}/${TEST_CASE_FOLDER}/${INDVIDUAL_TEST_FOLDER}" -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}/${INDVIDUAL_TEST_FOLDER}" -path "*/node_modules" -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 #
|
||||
|
|
Loading…
Reference in a new issue