Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizations of shellcheck linter #1965

Open
mbargull opened this issue Jun 27, 2024 · 0 comments
Open

Allow customizations of shellcheck linter #1965

mbargull opened this issue Jun 27, 2024 · 0 comments

Comments

@mbargull
Copy link
Member

Comment:

As is, the shellcheck option unconditionally runs

shellcheck --enable=all --shell=bash --exclude=SC2154 "${RECIPE_DIR}"/*.sh

if enabled.
There are cases in which one would want to customize these options, e.g., in case of activation scripts it can make sense to use --shell=sh to lint for broader than Bash compatibility.

One flexible solution could be to turn the option from a Boolean switch to something akin to this:

shellcheck:
  - files: 'build.sh'
    args: [--enable=all, --shell=bash, --exclude=SC2154]
  - files: '*activate-*.sh'
    args: [--enable=all, --shell=sh]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant