ci: move shellcheck options to .shellcheckrc

That way, IDEs get to have the same behaviour as the CI

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31826>
This commit is contained in:
Eric Engestrom 2024-10-23 15:44:06 +02:00 committed by Marge Bot
parent e2eba3c7da
commit 460c2eb967
3 changed files with 12 additions and 1 deletions

View File

@ -13,7 +13,7 @@ anyfailed=0
while IFS= read -r -d $'' file; do while IFS= read -r -d $'' file; do
if is_bash "$file" ; then if is_bash "$file" ; then
if ! shellcheck -x -W0 -s bash "$file"; then if ! shellcheck "$file"; then
anyfailed=1 anyfailed=1
fi fi
fi fi

View File

@ -65,6 +65,7 @@ yaml-toml-shell-test:
changes: &toml_lint_files changes: &toml_lint_files
- .gitlab-ci/test/gitlab-ci.yml - .gitlab-ci/test/gitlab-ci.yml
- .gitlab-ci/**/*.sh - .gitlab-ci/**/*.sh
- .shellcheckrc
- bin/toml_lint.py - bin/toml_lint.py
- src/**/ci/*.toml - src/**/ci/*.toml
when: on_success when: on_success

10
.shellcheckrc Normal file
View File

@ -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