actionlint is a linter for GitHub Actions workflows. It includes the shellcheck linter, for linting run: commands inside of GA workflows.
The current Ale implementation was getting confused when parsing the line such an error occurred; it used the line returned by shellcheck (most commonly line 1 as run: entries are usually one-liners), instead of the line of the parent .yml file.
This PR addresses that, by adding a branching path when parsing the linting results. If it is identified as a shellcheck linting issue, it will further parse the output to extract the correct shellcheck error message and error code, but keep the parent .yml line.
This now correctly attributes the error to the line it appears. It sets the column to the beginning of the run: key, not to the exact column where the error appears in the value. This could probably be added with a bit of math, but I wanted to keep the PR simple for now.
actionlint
is a linter for GitHub Actions workflows. It includes theshellcheck
linter, for lintingrun:
commands inside of GA workflows.The current Ale implementation was getting confused when parsing the line such an error occurred; it used the line returned by
shellcheck
(most commonly line 1 asrun:
entries are usually one-liners), instead of the line of the parent.yml
file.This PR addresses that, by adding a branching path when parsing the linting results. If it is identified as a
shellcheck
linting issue, it will further parse the output to extract the correctshellcheck
error message and error code, but keep the parent.yml
line.This now correctly attributes the error to the line it appears. It sets the column to the beginning of the
run:
key, not to the exact column where the error appears in the value. This could probably be added with a bit of math, but I wanted to keep the PR simple for now.