From 369d5d3e4d9d0310c00c8f90a8513240e20162fb Mon Sep 17 00:00:00 2001 From: Martin Sehnoutka Date: Thu, 17 Sep 2020 11:11:46 +0200 Subject: [PATCH] GH workflow: introduce shellcheck job This job uses shellcheck to analyze all our bash scripts except for those in /vendor directory. It also allows sourcing /etc/os-release without checking it, because it doesn't make any sense to check that the CI machine has correct /etc/os-release file. Also allow useless cats because I don't think they cause any harm. --- .github/workflows/tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc04052c4..c941f7595 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,3 +91,14 @@ jobs: - name: Send coverage to codecov.io run: bash <(curl -s https://codecov.io/bash) + shellcheck: + name: "🐚 Shellcheck" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@0.5.0 + with: + ignore: vendor # We don't want to fix the code in vendored dependencies + env: + SHELLCHECK_OPTS: -e SC1091 -e SC2002 # don't check /etc/os-release sourcing and allow useless cats to live inside our codebase