From 11608866b71000da4fdca278dbbda7067c23116e Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 1 Jul 2020 11:59:00 -0500 Subject: [PATCH] fixed more bad logic --- lib/buildFileList.sh | 13 +++++++------ lib/linter.sh | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index c10284c8..96127e73 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -100,11 +100,11 @@ function BuildFileList() ##################### # Get the CFN files # ##################### - if [ "$FILE_TYPE" == "json" ] || [ "$FILE_TYPE" == "yml" ] || [ "$FILE_TYPE" == "yaml" ] && DetectCloudFormationFile "$FILE"; then + if [ "$FILE_TYPE" == "yml" ] || [ "$FILE_TYPE" == "yaml" ]; then ################################ # Append the file to the array # ################################ - FILE_ARRAY_CFN+=("$FILE") + FILE_ARRAY_YML+=("$FILE") ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## @@ -118,11 +118,12 @@ function BuildFileList() # Append the file to the array # ################################ FILE_ARRAY_CFN+=("$FILE") + + ########################################################## + # Set the READ_ONLY_CHANGE_FLAG since this could be exec # + ########################################################## + READ_ONLY_CHANGE_FLAG=1 fi - ########################################################## - # Set the READ_ONLY_CHANGE_FLAG since this could be exec # - ########################################################## - READ_ONLY_CHANGE_FLAG=1 ###################### # Get the JSON files # ###################### diff --git a/lib/linter.sh b/lib/linter.sh index e4f005c0..fa657826 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -991,7 +991,7 @@ if [ "$VALIDATE_ANSIBLE" == "true" ]; then # Due to the nature of how we want to validate Ansible, we cannot use the # standard loop, since it looks for an ansible folder, excludes certain # files, and looks for additional changes, it should be an outlier - LintAnsibleFiles + LintAnsibleFiles "$ANSIBLE_LINTER_RULES" # Passing rules but not needed, dont want to exclude unused var fi ######################