-
Notifications
You must be signed in to change notification settings - Fork 32
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 github status check for shell check #482
base: main
Are you sure you want to change the base?
Conversation
IgorTodorovskiIBM
commented
Oct 5, 2023
•
edited
Loading
edited
- shell check: https://github.com/koalaman/shellcheck
- gives warnings and suggestions for bash/sh shell scripts
- Once we fix all of the issues, we can make it a mandatory status check for PRs
- example: https://github.com/IgorTodorovskiIBM/meta/actions/runs/6422693602/job/17439724227?pr=50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Found this: https://github.com/marketplace/actions/sh-checker it includes shfmt as well as shellcheck |
Wondering if shfmt could be used as a pre-commit hook instead. https://github.com/scop/pre-commit-shfmt/tree/main Similarly, both these IDEs have plugins for shellcheck; so can offer corrective actions while developing. |
That makes sense. |
A pre-commit hook for shfmt is a good idea
It's just a formatter so it should be ok, all the tools seem to work okay from my tests.
|
For vim users, there are plugins for both shfmt and shellcheck. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not mean to approve...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a draft - ignore my approval 😁