Problem
The Lint workflow uses whichever shellcheck comes with the ubuntu-latest runner. Today that's Ubuntu 24.04 with shellcheck 0.9.0, and main passes. The newer shellcheck 0.11.0, which ships on GitHub's Ubuntu 26.04 runner image, fails the same command on main:
In kernel_installer.sh line 288:
success() {
^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly).
In kernel_installer.sh line 953:
get_verified_tarball() {
^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly).
shellcheck exits with code 1 even for "info" findings, so Lint will go red as soon as ubuntu-latest moves to 26.04. That happens without any change in this repo. GitHub says it will announce the move first; I couldn't find a date.
The two findings
success() (line 288) really is unused. No file in the repo calls it, and it has been unused since the script's first commit (3a89433, 2022). It can be deleted.
get_verified_tarball() (line 953) is a false positive. It's only called by name, as a string passed to run_ok (line 1280), which shellcheck can't see. A # shellcheck disable=SC2329 comment above the function, saying why, fixes it.
Suggested fix
- Delete
success(), and add the disable comment to get_verified_tarball(). Lint then passes on both 0.9.0 and 0.11.0.
- Install a fixed shellcheck version in
lint.yml instead of using the runner's copy. For example, download a specific release from https://github.com/koalaman/shellcheck/releases and check its checksum. Then a new shellcheck release can't turn main red without a commit to this repo.
How this was checked
On a clean copy of main at 79c3234, I ran the exact command from lint.yml:
shellcheck kernel_installer.sh src/slib.sh scripts/update-slib.sh
| shellcheck |
where |
result |
0.9.0 (Ubuntu package 0.9.0-1) |
Linux Mint 22.3, which is based on Ubuntu 24.04 |
exit code 0, no findings |
| 0.11.0 |
macOS (Homebrew) |
exit code 1, the two findings above |
The runner versions come from GitHub's runner-images repository:
ubuntu-latest is Ubuntu 24.04, and its image README (version 20261012.334.1) lists shellcheck 0.9.0-1.
- The Ubuntu 26.04 image README (version 20261012.163.1) lists shellcheck
0.11.0-2.
I did not run the workflow on an ubuntu-26.04 runner.