mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 10:10:56 -05:00
More logic
This commit is contained in:
parent
2a16b17bda
commit
0d31bcda2c
1 changed files with 16 additions and 10 deletions
|
@ -102,7 +102,6 @@ RAW_FILE_ARRAY=() # Array of all files that
|
||||||
READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md
|
READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md
|
||||||
TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore
|
TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore
|
||||||
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# Array of changed files #
|
# Array of changed files #
|
||||||
##########################
|
##########################
|
||||||
|
@ -248,7 +247,7 @@ GetLinterRules()
|
||||||
########################################################
|
########################################################
|
||||||
# No user default provided, using the template default #
|
# No user default provided, using the template default #
|
||||||
########################################################
|
########################################################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
echo " -> Codebase does NOT have file:[$LINTER_PATH/$FILE_NAME], using Default rules at:[$FILE_LOCATION]"
|
echo " -> Codebase does NOT have file:[$LINTER_PATH/$FILE_NAME], using Default rules at:[$FILE_LOCATION]"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -380,7 +379,7 @@ LintAnsibleFiles()
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# Success
|
# Success
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
# Success
|
# Success
|
||||||
echo "Successfully found binary in system"
|
echo "Successfully found binary in system"
|
||||||
echo "Location:[$VALIDATE_INSTALL_CMD]"
|
echo "Location:[$VALIDATE_INSTALL_CMD]"
|
||||||
|
@ -507,7 +506,7 @@ LintAnsibleFiles()
|
||||||
###############################
|
###############################
|
||||||
# Check to see if debug is on #
|
# Check to see if debug is on #
|
||||||
###############################
|
###############################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
########################
|
########################
|
||||||
# No Ansible dir found #
|
# No Ansible dir found #
|
||||||
########################
|
########################
|
||||||
|
@ -991,10 +990,17 @@ GetValidationInfo()
|
||||||
###############################
|
###############################
|
||||||
ACTIONS_RUNNER_DEBUG=$(echo "$ACTIONS_RUNNER_DEBUG" | awk '{print tolower($0)}')
|
ACTIONS_RUNNER_DEBUG=$(echo "$ACTIONS_RUNNER_DEBUG" | awk '{print tolower($0)}')
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Set to true if not false #
|
||||||
|
############################
|
||||||
|
if [ "$ACTIONS_RUNNER_DEBUG" != "false" ]; then
|
||||||
|
ACTIONS_RUNNER_DEBUG="true"
|
||||||
|
fi
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Debug on runner #
|
# Debug on runner #
|
||||||
###################
|
###################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
echo "--- DEBUG ---"
|
echo "--- DEBUG ---"
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
RUNNER=$(whoami)
|
RUNNER=$(whoami)
|
||||||
|
@ -1014,7 +1020,7 @@ BuildFileList()
|
||||||
################
|
################
|
||||||
# print header #
|
# print header #
|
||||||
################
|
################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "Pulling in code history and branches..."
|
echo "Pulling in code history and branches..."
|
||||||
|
@ -1043,7 +1049,7 @@ BuildFileList()
|
||||||
################
|
################
|
||||||
# print header #
|
# print header #
|
||||||
################
|
################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "Generating Diff with:[git diff --name-only 'master..$GITHUB_SHA' --diff-filter=d]"
|
echo "Generating Diff with:[git diff --name-only 'master..$GITHUB_SHA' --diff-filter=d]"
|
||||||
|
@ -1384,7 +1390,7 @@ LintCodebase()
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# Success
|
# Success
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
echo "Successfully found binary in system"
|
echo "Successfully found binary in system"
|
||||||
echo "Location:[$VALIDATE_INSTALL_CMD]"
|
echo "Location:[$VALIDATE_INSTALL_CMD]"
|
||||||
fi
|
fi
|
||||||
|
@ -1815,7 +1821,7 @@ GetGitHubVars
|
||||||
##########################################
|
##########################################
|
||||||
# Get the langugages we need to validate #
|
# Get the langugages we need to validate #
|
||||||
##########################################
|
##########################################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
# Get the flags for langugaes to validate
|
# Get the flags for langugaes to validate
|
||||||
GetValidationInfo
|
GetValidationInfo
|
||||||
fi
|
fi
|
||||||
|
@ -1849,7 +1855,7 @@ GetLinterRules "$TERRAFORM_FILE_NAME" "$TERRAFORM_LINTER_RULES"
|
||||||
#################################
|
#################################
|
||||||
# Check if were in verbose mode #
|
# Check if were in verbose mode #
|
||||||
#################################
|
#################################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" != "false" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
##################################
|
##################################
|
||||||
# Get and print all version info #
|
# Get and print all version info #
|
||||||
##################################
|
##################################
|
||||||
|
|
Loading…
Reference in a new issue