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.
This commit is contained in:
Martin Sehnoutka 2020-09-17 11:11:46 +02:00 committed by Ondřej Budai
parent d9f254f9d1
commit 369d5d3e4d

View file

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