mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 15:22:16 -05:00
Fix new issues
This commit is contained in:
parent
889179e0bf
commit
c6594d8fb5
4 changed files with 14 additions and 29 deletions
2
.vscode/testlinter.sh
vendored
2
.vscode/testlinter.sh
vendored
|
@ -22,5 +22,5 @@ fi
|
|||
#########################
|
||||
export RUN_LOCAL=true
|
||||
|
||||
# shellcheck source=../lib/linter.sh
|
||||
# shellcheck source=/dev/null
|
||||
source "$PWD"/lib/linter.sh
|
||||
|
|
|
@ -411,7 +411,7 @@ function BuildFileList()
|
|||
fi
|
||||
done
|
||||
|
||||
echo $READ_ONLY_CHANGE_FLAG > /dev/null 2>&1 || true # Workaround SC2034
|
||||
echo ${READ_ONLY_CHANGE_FLAG} > /dev/null 2>&1 || true # Workaround SC2034
|
||||
|
||||
#########################################
|
||||
# Need to switch back to branch of code #
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
#########################
|
||||
# Source Function Files #
|
||||
#########################
|
||||
# shellcheck source=../lib/buildFileList.sh
|
||||
# shellcheck source=/dev/null
|
||||
source /action/lib/buildFileList.sh # Source the function script(s)
|
||||
# shellcheck source=../lib/validation.sh
|
||||
# shellcheck source=/dev/null
|
||||
source /action/lib/validation.sh # Source the function script(s)
|
||||
# shellcheck source=../lib/worker.sh
|
||||
# shellcheck source=/dev/null
|
||||
source /action/lib/worker.sh # Source the function script(s)
|
||||
|
||||
###########
|
||||
|
@ -150,10 +150,15 @@ DEFAULT_IFS="$IFS" # Get the Default IFS for updating
|
|||
# Default Vars that are called in Subs and need to be ignored #
|
||||
###############################################################
|
||||
DEFAULT_DISABLE_ERRORS='false' # Default to enabling errors
|
||||
echo "${DEFAULT_DISABLE_ERRORS}" > /dev/null 2>&1 || true # Workaround SC2034
|
||||
RAW_FILE_ARRAY=() # Array of all files that were changed
|
||||
echo "${RAW_FILE_ARRAY[*]}" > /dev/null 2>&1 || true # Workaround SC2034
|
||||
READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md
|
||||
echo "${READ_ONLY_CHANGE_FLAG}" > /dev/null 2>&1 || true # Workaround SC2034
|
||||
TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore
|
||||
echo "${TEST_CASE_FOLDER}" > /dev/null 2>&1 || true # Workaround SC2034
|
||||
DEFAULT_ANSIBLE_DIRECTORY="$GITHUB_WORKSPACE/ansible" # Default Ansible Directory
|
||||
echo "${DEFAULT_ANSIBLE_DIRECTORY}" > /dev/null 2>&1 || true # Workaround SC2034
|
||||
|
||||
##########################
|
||||
# Array of changed files #
|
||||
|
|
|
@ -253,30 +253,10 @@ function TestCodebase()
|
|||
##########################
|
||||
LIST_FILES=()
|
||||
|
||||
############################################
|
||||
# Check if its ansible, as its the outlier #
|
||||
############################################
|
||||
if [[ "$FILE_TYPE" == "ANSIBLE" ]]; then
|
||||
#################################
|
||||
# Get list of all files to lint #
|
||||
#################################
|
||||
mapfile -t LIST_FILES < <(ls "$GITHUB_WORKSPACE/$TEST_CASE_FOLDER/ansible/*.yml" 2>&1)
|
||||
else
|
||||
###############################################################################
|
||||
# Set the file seperator to newline to allow for grabbing objects with spaces #
|
||||
###############################################################################
|
||||
IFS=$'\n'
|
||||
|
||||
#################################
|
||||
# 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 "*./ansible*" 2>&1)
|
||||
|
||||
###########################
|
||||
# Set IFS back to default #
|
||||
###########################
|
||||
IFS="$DEFAULT_IFS"
|
||||
fi
|
||||
#################################
|
||||
# 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/*" 2>&1)
|
||||
|
||||
##################
|
||||
# Lint the files #
|
||||
|
|
Loading…
Reference in a new issue