test: update shellcheck test

dev
Kevin Zhuang 3 years ago
parent 0f34e14c5f
commit e46a5e2a8b

@ -4,27 +4,27 @@
set -e set -e
mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" mydir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${mydir}"/../ cd "${mydir}"/../
scripts=() scripts=()
while IFS= read -r -d $'\0' line; do while IFS= read -r -d $'\0' line; do
scripts+=("$line") scripts+=("$line")
done < <( done < <(
find \ find \
dotbare \ dotbare \
helper/* \ helper/* \
scripts/* \ scripts/* \
tests/shellcheck.sh \ tests/shellcheck.sh \
-type f \ -type f \
-print0 -print0
) )
shellcheck -e SC1090 "${scripts[@]}" shellcheck -e SC1091 "${scripts[@]}"
shellcheck -e SC1090 --shell=bash "dotbare.plugin.bash" shellcheck -e SC1091 --shell=bash "dotbare.plugin.bash"
shellcheck --shell=bash "pkg/completion/bash/dotbare" shellcheck --shell=bash "pkg/completion/bash/dotbare"
# \shellcheck does not have zsh support yet, hence using bash for now # \shellcheck does not have zsh support yet, hence using bash for now
shellcheck -e SC2034 --shell=bash "dotbare.plugin.zsh" shellcheck -e SC2034,SC2277,SC2269 --shell=bash "dotbare.plugin.zsh"
shellcheck -e SC2034 --shell=bash "pkg/completion/zsh/_dotbare" shellcheck -e SC2034,SC2269 --shell=bash "pkg/completion/zsh/_dotbare"
exit $? exit $?

Loading…
Cancel
Save