-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add shellcheck
dependency in pre-commit hooks
#482
base: main
Are you sure you want to change the base?
Conversation
Since I'm not a pre-commit user, I can't say this is the right direction or not. However let me confirm one thing. Why do you use the WASI port of shellcheck instead of the official released binaries? The go-shellcheck project looks very young. It's unclear how it will be maintained (e.g. following the new releases). I'm not sure that we should rely on the project. |
Randomly noticed this PR and just wanted to answer this point, there is an automatic update script for catching new upstream releases https://github.com/wasilibs/go-shellcheck/blob/main/.github/workflows/update.yaml shellcheck is the latest project but there are several other ones in wasilibs and it's been pretty easy to keep up with releases thanks to the automated updates. That being said, I agree with the sentiment of sticking to official repos so if there's an easy way to use the official binaries with pre-commit, it's probably better, just wanted to clarify the above point. |
@anuraaga Thank you for the explanation. Then I'm okay to rely on go-shellcheck. However I'm not a pre-commit user as I said. So I'd like to hear opinion from some practical pre-commit users. |
I'm a pre-commit user, and I can confirm:
However, I'm not sure this is the best approach. Using You can take a look at the pre-commit configuration I'm adding in https://github.com/astral-sh/ruff/pull/15021/files as an example of how to use actionlint as a pre-commit hook while enabling the shellcheck integration |
Fixes #477
This pull request adds the
github.com/wasilibs/go-shellcheck/cmd/shellcheck@latest
package as a dependency for actionlintpre-commit
hooks. This change resolves the issue reported in #477.Please note that I'm not familiar with Go and may not have chosen the most optimal dependency package. If you have a better approach, please let me know and I'll be happy to update the code.