-
Notifications
You must be signed in to change notification settings - Fork 53
[AOMP] Add shellcheck workflow #1435
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
base: aomp-dev
Are you sure you want to change the base?
Conversation
This adds an initial (crude) shellcheck workflow. This can be refined much more. - Use shellcheck directly from maintainer github. - Filter which files to check. - Come up with set of guidelines / rules for errs/warns.
Use find + xargs to make the job fail in case shellcheck found issues.
This depends on #1252 and makes only sense once that has landed. |
I think we want to wait for #1463 to land and then use this wrapper instead of plain |
As it is, the aomp-shellcheck script automatically modifies the files given as arguments in some circumstances (i.e. if they have failing checks in the "patchable" check list), which is probably not desirable for the GitHub workflow case. |
Good point. Should there be a |
I think so, something like that. |
I've added a new --check-only option in the version up on #1463 now. |
|
||
- name: Run shellcheck | ||
run: | | ||
find . -name "*.sh" | xargs shellcheck -S info {} \; |
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.
The syntax is wrong, which must be
find . -name "*.sh" | xargs shellcheck -S info {} \; | |
find . -name "*.sh" -exec shellcheck -S info {} + |
or
find . -name "*.sh" | xargs shellcheck -S info {} \; | |
find . -name "*.sh" | xargs shellcheck -S info |
No description provided.