From 0244ffbf53d5c5b758d67ecfb7c3f109f17d5250 Mon Sep 17 00:00:00 2001 From: Daniele Debernardi Date: Sun, 5 Jan 2020 02:35:29 +0100 Subject: [PATCH] static_code_analysis.sh: find all shell files (!1853) --- test/static_code_analysis.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/static_code_analysis.sh b/test/static_code_analysis.sh index 34059754..2baea893 100755 --- a/test/static_code_analysis.sh +++ b/test/static_code_analysis.sh @@ -39,16 +39,8 @@ shellcheck_command="$command $rootfs_native/usr/bin/shellcheck" flake8_command="$command $rootfs_native/usr/bin/python3 $rootfs_native/usr/bin/flake8" # Shell: shellcheck -sh_files=" - ./test/static_code_analysis.sh - ./test/testcases_fast.sh - ./helpers/envsetup.sh - ./helpers/envkernel.sh - ./.gitlab/setup-pmos-environment.sh - ./.gitlab/shared-runner_test-pmbootstrap.sh - $(find . -name '*.trigger') -" -for file in ${sh_files}; do +find . -name '*.sh' | +while read -r file; do echo "Test with shellcheck: $file" cd "$DIR/../$(dirname "$file")" $shellcheck_command -e SC1008 -x "$(basename "$file")"