cloud-infra: Specify lookup path for shellcheck
[infra/cicd.git] / 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