diff --git a/.gitlab-ci/run-shellcheck.sh b/.gitlab-ci/run-shellcheck.sh index 79d8ab3597a..76dea93e4a9 100755 --- a/.gitlab-ci/run-shellcheck.sh +++ b/.gitlab-ci/run-shellcheck.sh @@ -13,7 +13,7 @@ anyfailed=0 while IFS= read -r -d $'' file; do if is_bash "$file" ; then - if ! shellcheck -x -W0 -s bash "$file"; then + if ! shellcheck "$file"; then anyfailed=1 fi fi diff --git a/.gitlab-ci/test/gitlab-ci.yml b/.gitlab-ci/test/gitlab-ci.yml index 6eaeb8e8672..ca845027865 100644 --- a/.gitlab-ci/test/gitlab-ci.yml +++ b/.gitlab-ci/test/gitlab-ci.yml @@ -65,6 +65,7 @@ yaml-toml-shell-test: changes: &toml_lint_files - .gitlab-ci/test/gitlab-ci.yml - .gitlab-ci/**/*.sh + - .shellcheckrc - bin/toml_lint.py - src/**/ci/*.toml when: on_success diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 00000000000..8534815fdc0 --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1,10 @@ +# Allow using `source` to execute the contents of other files than the one +# being checked. +external-sources=true + +# Do not print links to wiki pages explaining why this is an issue. +wiki-link-count=0 + +# All shell scripts are being run using bash, even if they are lacking +# a shebang. +shell=bash