From 7ae7b6b02bf8981ca292d9d7c64ebcd249774fa7 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 12 Sep 2025 07:36:54 -0700 Subject: [PATCH] Add comment to workflow re: unexpected behavior of "liskin/gh-problem-matcher-wrap" action The "liskin/gh-problem-matcher-wrap" action is used in the "Check Shell" workflow to enhance the workflow run results summary by applying a "problem matcher" to the output of the shellcheck tool. This action is a wrapper around shell commands, so we would expect its `run` input to work the same as the `jobs..steps[*].run` key of the GitHub Actions workflow. However, this is not the case. The commands specified via the `jobs..steps[*].run` key can be split into multiple lines using the standard shell line continuation operator. That is useful in the case of long/complex shell commands such as the one used to execute the `shell:check` task in this workflow step. This is not possible when using "liskin/gh-problem-matcher-wrap". A comment is added to explain this behavior. --- .github/workflows/check-shell-task.yml | 2 ++ workflow-templates/check-shell-task.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/check-shell-task.yml b/.github/workflows/check-shell-task.yml index ea5469ff..f5294db4 100644 --- a/.github/workflows/check-shell-task.yml +++ b/.github/workflows/check-shell-task.yml @@ -125,6 +125,8 @@ jobs: continue-on-error: ${{ matrix.configuration.continue-on-error }} with: linters: gcc + # Due to a quirk of the "liskin/gh-problem-matcher-wrap" action, the entire command must be on a single line + # (instead of being broken into multiple lines for readability). run: task --silent shell:check SCRIPT_PATH="${{ matrix.script }}" SHELLCHECK_FORMAT=${{ matrix.configuration.format }} formatting: diff --git a/workflow-templates/check-shell-task.yml b/workflow-templates/check-shell-task.yml index 29fb5a51..bf73ca96 100644 --- a/workflow-templates/check-shell-task.yml +++ b/workflow-templates/check-shell-task.yml @@ -126,6 +126,8 @@ jobs: continue-on-error: ${{ matrix.configuration.continue-on-error }} with: linters: gcc + # Due to a quirk of the "liskin/gh-problem-matcher-wrap" action, the entire command must be on a single line + # (instead of being broken into multiple lines for readability). run: task --silent shell:check SCRIPT_PATH="${{ matrix.script }}" SHELLCHECK_FORMAT=${{ matrix.configuration.format }} formatting: