Skip to content

Commit 7ae7b6b

Browse files
committed
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.<job_id>.steps[*].run` key of the GitHub Actions workflow. However, this is not the case. The commands specified via the `jobs.<job_id>.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.
1 parent 8f926d3 commit 7ae7b6b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/check-shell-task.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ jobs:
125125
continue-on-error: ${{ matrix.configuration.continue-on-error }}
126126
with:
127127
linters: gcc
128+
# Due to a quirk of the "liskin/gh-problem-matcher-wrap" action, the entire command must be on a single line
129+
# (instead of being broken into multiple lines for readability).
128130
run: task --silent shell:check SCRIPT_PATH="${{ matrix.script }}" SHELLCHECK_FORMAT=${{ matrix.configuration.format }}
129131

130132
formatting:

workflow-templates/check-shell-task.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ jobs:
126126
continue-on-error: ${{ matrix.configuration.continue-on-error }}
127127
with:
128128
linters: gcc
129+
# Due to a quirk of the "liskin/gh-problem-matcher-wrap" action, the entire command must be on a single line
130+
# (instead of being broken into multiple lines for readability).
129131
run: task --silent shell:check SCRIPT_PATH="${{ matrix.script }}" SHELLCHECK_FORMAT=${{ matrix.configuration.format }}
130132

131133
formatting:

0 commit comments

Comments
 (0)