From 7d9644f8b8f5be09d0ba9948733080fb9e0e70e7 Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Mon, 28 Mar 2022 13:15:03 +0200 Subject: [PATCH] Change Shellcheck GitHub action to lint all files at once. --- .github/workflows/shellcheck.yml | 54 ++++---------------------------- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 8fa3310..0b470b1 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -1,57 +1,15 @@ ---- -# The idea here is to run Shellcheck for each file, so violations can be fixed -# incrementally. As soon as a file has been fixed to pass shellcheck, it should -# no longer be allowed to fail. -# -# Once all files have been fixed, the jobs can all be replaced by one single run -# that checks all files at once. -# -# For discussion and further details see: https://github.com/bpkg/bpkg/issues/78 - on: - push - pull_request jobs: - allowed_to_fail: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - file: - - bpkg.sh - - setup.sh - - lib/init/init.sh - - lib/install/install.sh - - lib/json/JSON.sh - - lib/suggest/suggest.sh - steps: - - uses: actions/checkout@v2 - - uses: pipeline-components/shellcheck@v0.6.1 - continue-on-error: true - with: - directory: ${{ matrix.file }} - options: -f gcc -x lib/utils/utils.sh - - must_pass: + shellcheck: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - file: - - lib/getdeps/getdeps.sh - - lib/list/list.sh - - lib/package/package.sh - - lib/show/show.sh - - lib/term/term.sh - - lib/update/update.sh - - lib/utils/utils.sh - - lib/env/env.sh - - lib/run/run.sh - - lib/source/source.sh steps: - uses: actions/checkout@v2 - - uses: pipeline-components/shellcheck@v0.6.1 + - env: + PIPELINECOMPONENTS_GLOBASSIST: true + uses: pipeline-components/shellcheck@v0.10.0 with: - directory: ${{ matrix.file }} - options: -f gcc -x lib/utils/utils.sh + directory: "**/*.sh" + options: --format=gcc --external-sources