From 117b81fff6da7b146f1e7fbfcf02486a1bf26481 Mon Sep 17 00:00:00 2001 From: Igor Date: Sat, 9 Dec 2023 15:43:42 +0100 Subject: [PATCH] Lint only bash files --- .github/workflows/lint.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d9f985fe6..8bbd00c17 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,4 +23,9 @@ jobs: shell: bash {0} run: | - for file in $(find . -type f -executable ! -path '*/.git*/*' -exec grep -Iq . {} \; -print); do shellcheck -x $file; done + for file in $(find . -type f -executable ! -path '*/.git*/*' -exec grep -Iq . {} \; -print); do + if grep -qE "^#\!/.*" $file; then + shellcheck --severity=error $file || ret=$? + fi + done + exit $ret