GH Actions: add shellcheck job + allow scripts to pass the new check#924
Draft
GH Actions: add shellcheck job + allow scripts to pass the new check#924
Conversation
Member
Author
|
Current status: CI passes. To do before merge:
|
Shellcheck is a static analysis tool for shell scripts, which can help find common mistakes, simplifications and point out best practices. This commit adds a new GH Actions job to run shellcheck on all shell scripts in this repo. At this moment, that means it will run over the `tests/utils/proxy` start/stop scripts, but more scripts are expected to be added in the near future. I've researched the available action runners and found the `ludeeus/action-shellcheck` one to be the most popular as well as suitable for our needs. Additionally, the `lumaxis/shellcheck-problem-matchers` will allow for showing any issues found inline in the GH code view via annotations. Refs: * https://www.shellcheck.net/ * https://github.com/koalaman/shellcheck/wiki/Integration * https://github.com/ludeeus/action-shellcheck * https://github.com/lumaxis/shellcheck-problem-matchers
Various tweaks to allow the scripts to pass the shellcheck checks.
15cf874 to
1d5b105
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detailed Description
GH Actions: add shellcheck job
Shellcheck is a static analysis tool for shell scripts, which can help find common mistakes, simplifications and point out best practices.
This commit adds a new GH Actions job to run shellcheck on all shell scripts in this repo.
At this moment, that means it will run over the
tests/utils/proxystart/stop scripts, but more scripts are expected to be added in the near future.I've researched the available action runners and found the
ludeeus/action-shellcheckone to be the most popular as well as suitable for our needs.Additionally, the
lumaxis/shellcheck-problem-matcherswill allow for showing any issues found inline in the GH code view via annotations.Refs:
[INCOMPLETE] Shell scripts: various tweaks
Various tweaks to allow the scripts to pass the shellcheck checks.
shellcheck- this is mostly due to quoting$ARGSin thestart-stop-daemoncommand breaking the test runs. For that reason, this PR is being opened as draft.