From 94e03d50ac97a7a9e04706d073a28ca4b3df7948 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:01:43 -0500 Subject: [PATCH 1/3] better loop --- lib/linter.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 4e17890d..58b43157 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1082,7 +1082,7 @@ Footer() { #################################################### # Need to clean up the lanuage array of duplicates # #################################################### - mapfile -t UNIQUE_LINTED_ARRAY < <(echo "${LINTED_LANGUAGES_ARRAY[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + UNIQUE_LINTED_ARRAY=($(for LANG in "${LINTED_LANGUAGES_ARRAY[@]}"; do echo "${LANG}"; done | sort -u)) ############################## # Prints for errors if found # From 4bf0aee9232799b391e27980296b73d7f1c7d904 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:12:24 -0500 Subject: [PATCH 2/3] Make it happy --- lib/linter.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 58b43157..79af7fe5 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1082,7 +1082,7 @@ Footer() { #################################################### # Need to clean up the lanuage array of duplicates # #################################################### - UNIQUE_LINTED_ARRAY=($(for LANG in "${LINTED_LANGUAGES_ARRAY[@]}"; do echo "${LANG}"; done | sort -u)) + mapfile -t UNIQUE_LINTED_ARRAY < <(for LANG in "${LINTED_LANGUAGES_ARRAY[@]}"; do echo "${LANG}"; done | sort -u) ############################## # Prints for errors if found # From d9f35b2af749f7d73ebd781c6a5925ab15b68a45 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:26:05 -0500 Subject: [PATCH 3/3] more cleanupo --- lib/buildFileList.sh | 3 ++- lib/linter.sh | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index c3cf58cd..17f9d271 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -70,7 +70,8 @@ function BuildFileList() { # Iterate through the array of all files found # ################################################ info "----------------------------------------------" - info "Files that have been modified in the commit(s):" + info "------ Files modified in the commit(s): ------" + info "----------------------------------------------" for FILE in "${RAW_FILE_ARRAY[@]}"; do ########################### # Get the files extension # diff --git a/lib/linter.sh b/lib/linter.sh index 79af7fe5..df102260 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1771,8 +1771,7 @@ if [ "${VALIDATE_R}" == "true" ]; then ########################## # Check for local config # ########################## - if [ ! -f "${GITHUB_WORKSPACE}/.lintr" ] && [ ${#FILE_ARRAY_R[@]} -ne 0 ]; then - info " " + if [ ! -f "${GITHUB_WORKSPACE}/.lintr" ] && (( ${#FILE_ARRAY_R[@]} )); then info "No .lintr configuration file found, using defaults." cp $R_LINTER_RULES "$GITHUB_WORKSPACE" fi @@ -1790,7 +1789,6 @@ if [ "${VALIDATE_RAKU}" == "true" ]; then ####################### # Lint the raku files # ####################### - info "${GITHUB_WORKSPACE}/META6.json" if [ -e "${GITHUB_WORKSPACE}/META6.json" ]; then cd "${GITHUB_WORKSPACE}" && zef install --deps-only --/test . fi