Skip to content

Add shellcheck CI job#746

Open
taspelund wants to merge 7 commits into
mainfrom
trey/shellcheck
Open

Add shellcheck CI job#746
taspelund wants to merge 7 commits into
mainfrom
trey/shellcheck

Conversation

@taspelund
Copy link
Copy Markdown
Contributor

Adds a CI job to shellcheck CI jobs. Also fixes up some existing shellcheck errors in the scripts.

taspelund added 2 commits May 21, 2026 12:27
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>
@taspelund taspelund requested a review from rcgoodfellow May 21, 2026 18:31
@taspelund taspelund self-assigned this May 21, 2026
@taspelund taspelund added the CI label May 21, 2026
taspelund added 2 commits May 21, 2026 12:32
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>
Comment thread .github/buildomat/jobs/shellcheck.sh Outdated
taspelund added 2 commits May 21, 2026 19:35
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>
Comment thread .github/buildomat/jobs/shellcheck.sh Outdated
Comment thread .github/buildomat/jobs/shellcheck.sh
Comment thread .github/buildomat/jobs/shellcheck.sh
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Copy link
Copy Markdown
Contributor

@zeeshanlakhani zeeshanlakhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be better shellfu reviewers, but thanks for my answering my Q's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants