Skip to content

[feature request] Run shellcheck (or equivalent linter) on individual steps #65

@falonso-alo

Description

@falonso-alo

Is your feature request related to a problem? Please describe.

There are lots of subtle issues related to executing bash. However, because Github Actions uses YAML you lose useful shell linting options.

Today, I ran into a set of issues with bash environment variables. Here is a script with some nonintuitive (for me at least) behavior:

export env=prod
echo "${env}"              # => prod
env="uat" echo "${env}"    # => prod
env="uat" && echo "${env}" # => uat

The Shellcheck VS Code extension actually catches this issue, but you can't use it from Github Actions because the shell is embedded in the YAML.

Here are the linting warnings provided by Shellcheck's VS Code extension for shell files:

image

image

Describe the solution you'd like

I would like to see the linting warnings from Shellcheck appear in the Github Actions steps.

image

Please let me know if additional clarification is required.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done 💤

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions