dist/tools/ci/static_tests.sh: fix shellcheck warnings

This commit is contained in:
Martine Lenders 2021-01-12 20:56:48 +01:00
parent f6290c1c02
commit 89418e4277
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

@ -10,7 +10,7 @@
# directory for more details. # directory for more details.
# #
. $(dirname "$0")/github_annotate.sh . "$(dirname "${0}")"/github_annotate.sh
declare -A DEPS declare -A DEPS
@ -24,7 +24,7 @@ DEPS["./dist/tools/codespell/check.sh"]="codespell"
DEPS["./dist/tools/uncrustify/uncrustify.sh"]="uncrustify" DEPS["./dist/tools/uncrustify/uncrustify.sh"]="uncrustify"
DEPS["./dist/tools/shellcheck/shellcheck.sh"]="shellcheck" DEPS["./dist/tools/shellcheck/shellcheck.sh"]="shellcheck"
if ! command -v git 2>&1 1>/dev/null; then if ! command -v git &>/dev/null; then
echo -n "Required command 'git' for all static tests not found in PATH " echo -n "Required command 'git' for all static tests not found in PATH "
print_warning print_warning
set_result 1 set_result 1
@ -61,7 +61,7 @@ set_result() {
function run { function run {
for dep in ${DEPS["$1"]}; do for dep in ${DEPS["$1"]}; do
if ! command -v ${dep} 2>&1 1>/dev/null; then if ! command -v ${dep} &>/dev/null; then
echo -n "Required command '${dep}' for '$*' not found in PATH " echo -n "Required command '${dep}' for '$*' not found in PATH "
print_warning print_warning
set_result 1 set_result 1