Closed cclauss closed 3 years ago
I'm now on the beta waitlist. I don't know if or when I'll get approved, but I'll have a look then.
Any update? I'd would really like to use an "official" shellcheck action. Thanks
What is wrong with https://github.com/marketplace/actions/shellcheck ?
Even GHA images include shellcheck by default - through APT packages: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
Reviewdog supports it, if you want shellcheck w/ Github Annotations.
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
path: "." # Optional.
pattern: "*.sh" # Optional.
filter_mode: nofilter # Optional.
fail_on_error: true
You can combine https://github.com/koalaman/shellcheck-precommit with https://github.com/pre-commit/action to autorun spellcheck locally on every commit and also in a GitHub Action on every push, pull, etc.
I didn't know about this pre-commit github action. That's interesting. Thanks!
I don't think that has the GitHub annotations. Reviewdog works out of the box.
I don't think that has the GitHub annotations. Reviewdog works out of the box.
Can you please elaborate on the GitHub annotations? I am not sure that I know what you're referring to.
Annotation simply appear in your PR-s and commits between two lines.
You simply echo "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
from CI.
https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#setting-an-error-message
Shellcheck needs a new formatter https://github.com/koalaman/shellcheck/tree/master/src/ShellCheck/Formatter In the meantime you can convert "checkstyle" to GHA annotations. For example there is https://github.com/staabm/annotate-pull-request-from-checkstyle for you.
Should this project contain the code for a simple yet flexible GitHub Action that allows repo maintainers to quickly add automated shellcheck testing on all pull requests submitted to their repos?
Putting that code into this repo or another koalaman repo will focus development efforts on a single, community-supported GitHub Action for shellcheck instead of a multitude of homegrown solutions.
Currently you must be in the GitHub Action beta to be able to use Actions.
https://github.com/marketplace/actions/haskell-linter