-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi!
First of all, thanks for the extension — it’s super useful for highlighting and linting shell scripts in GitHub Actions workflows.
I noticed an issue when using ShellCheck inside .github/workflows/*.yaml scripts, for example with this snippet:
if [[ "${{ github.ref }}" == "refs/tags/v"* ]]; then
echo "This is a tag starting with v"
fi-
ShellCheck (SC2193) reports:
The arguments to this comparison can never be equal. Make sure your syntax is correct.
-
The problem is that ShellCheck does not recognize GitHub Actions expressions like
${{ github.ref }}, and treats them as literal strings. This produces a false positive.
Suggestion:
It would be great if the extension could detect GitHub Actions expressions and either:
- Ignore them in static analysis, or
- Evaluate them in a GitHub Actions context for linting purposes.
This would prevent false positives like SC2193 when using GitHub-specific syntax in shell scripts inside workflows.
Thanks a lot for considering this improvement!