From 1fbb275111bc1855caf7ced0195d079db1e3e463 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Mon, 23 Oct 2023 18:46:46 +0200 Subject: [PATCH 1/2] Shell check on CI --- .github/workflows/shellcheck.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/shellcheck.yaml diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml new file mode 100644 index 00000000..58652173 --- /dev/null +++ b/.github/workflows/shellcheck.yaml @@ -0,0 +1,13 @@ +name: Shell check + +on: + - push + - pull_request + +jobs: + pytest: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Shell check + run: ./shellcheck.sh From ab68ea1ceab6a03b29195097ca5250ad4406f22a Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Mon, 23 Oct 2023 18:51:13 +0200 Subject: [PATCH 2/2] Explicit exclude --- shellcheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shellcheck.sh b/shellcheck.sh index fa00da1b..a146b64d 100755 --- a/shellcheck.sh +++ b/shellcheck.sh @@ -17,7 +17,7 @@ if ! command -v shellcheck > /dev/null 2>&1; then scversion="stable" # or "v0.4.7", or "latest" wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv shellcheck-stable/shellcheck --version - shellcheck-stable/shellcheck -- *.sh + shellcheck-stable/shellcheck --exclude=SC2230 -- *.sh else - shellcheck -- *.sh + shellcheck --exclude=SC2230 -- *.sh fi