cloud-infra: Specify lookup path for shellcheck 97/3197/2
authorFatih Degirmenci <fdegir@gmail.com>
Mon, 16 Dec 2019 09:55:24 +0000 (10:55 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Mon, 16 Dec 2019 10:00:38 +0000 (11:00 +0100)
Change-Id: Ic071091030e606e342b4e0cb16ab657ae1d48ad2

jjb/cloud-infra/scripts/cloud-infra-shellcheck.sh

index 1144f14a9ebc943b1178d50385bcf434a1e561d2..6c6f69a216148c81392ceee90b7c4bd7e403f4e6 100644 (file)
@@ -33,7 +33,8 @@ declare -i exit_code=0
 # lint the bash scripts
 for shell_script in $(find ${WORKSPACE}/ -type f -name *.sh); do
   echo "--> Checking '${shell_script}' shell script..."
-  shellcheck --color=never ${shell_script}
+  shellcheck --color=never --source-path="${WORKSPACE}" --external-sources \
+      --format=tty ${shell_script}
   lint_exit_code=$?
   if [[ $lint_exit_code != 0 ]]; then
     exit_code=$lint_exit_code