Add shellcheck CI job#746
Open
taspelund wants to merge 7 commits into
Open
Conversation
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Running the new shellcheck job locally reports a bunch of errors. This fixes them: ``` In .github/buildomat/jobs/test-bgp.sh line 18: cp *.log /work/ ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options. In .github/buildomat/jobs/test-bgp.sh line 23: cp *.log /work/ ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options. For more information: https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name... .github/buildomat/jobs/test-bgp.sh failed shellcheck In .github/buildomat/jobs/test-interop.sh line 185: cp *.log /work/ ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options. For more information: https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name... .github/buildomat/jobs/test-interop.sh failed shellcheck In .github/buildomat/jobs/test-proptest.sh line 37: cp *.log /work/ 2>/dev/null || true ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options. In .github/buildomat/jobs/test-proptest.sh line 46: cp *.log /work/ 2>/dev/null || true ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options. For more information: https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name... .github/buildomat/jobs/test-proptest.sh failed shellcheck In .github/buildomat/jobs/test-rdb.sh line 23: cp *.log /work/ ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options. For more information: https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name... .github/buildomat/jobs/test-rdb.sh failed shellcheck ``` Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Use the right name (fix copy/paste) and remove unneeded buildomat conf. Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Shellcheck complains that a couple "source" calls fail with ENOENT. Add the shellcheck directive to look at /dev/null since the files don't always exist. Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
cbee9e4 to
ddb82e8
Compare
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Adds the "-o all" flag in shellcheck to enable all optional lints. Updates all existing CI scripts to pass shellcheck with all lints on. Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
ddb82e8 to
6f1b6e2
Compare
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
zeeshanlakhani
approved these changes
May 22, 2026
Contributor
zeeshanlakhani
left a comment
There was a problem hiding this comment.
There may be better shellfu reviewers, but thanks for my answering my Q's.
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.
Adds a CI job to shellcheck CI jobs. Also fixes up some existing shellcheck errors in the scripts.