From e46a5e2a8ba31a1ce0c0bda6801939a4b4f38bf8 Mon Sep 17 00:00:00 2001 From: Kevin Zhuang Date: Mon, 16 Aug 2021 09:47:24 +1000 Subject: [PATCH] test: update shellcheck test --- tests/shellcheck.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/shellcheck.sh b/tests/shellcheck.sh index 352114f..73223a7 100755 --- a/tests/shellcheck.sh +++ b/tests/shellcheck.sh @@ -4,27 +4,27 @@ set -e -mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +mydir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${mydir}"/../ scripts=() -while IFS= read -r -d $'\0' line; do - scripts+=("$line") +while IFS= read -r -d $'\0' line; do + scripts+=("$line") done < <( - find \ - dotbare \ - helper/* \ - scripts/* \ - tests/shellcheck.sh \ - -type f \ - -print0 - ) + find \ + dotbare \ + helper/* \ + scripts/* \ + tests/shellcheck.sh \ + -type f \ + -print0 +) -shellcheck -e SC1090 "${scripts[@]}" -shellcheck -e SC1090 --shell=bash "dotbare.plugin.bash" +shellcheck -e SC1091 "${scripts[@]}" +shellcheck -e SC1091 --shell=bash "dotbare.plugin.bash" shellcheck --shell=bash "pkg/completion/bash/dotbare" # \shellcheck does not have zsh support yet, hence using bash for now -shellcheck -e SC2034 --shell=bash "dotbare.plugin.zsh" -shellcheck -e SC2034 --shell=bash "pkg/completion/zsh/_dotbare" +shellcheck -e SC2034,SC2277,SC2269 --shell=bash "dotbare.plugin.zsh" +shellcheck -e SC2034,SC2269 --shell=bash "pkg/completion/zsh/_dotbare" exit $?