ci: download shfmt binary instead of installing via go - #2405
Merged
seefood merged 3 commits intoAug 30, 2026
Merged
Conversation
The lint job pinned Go 1.25.8 solely to `go install` shfmt, which is slow and pulls in the whole Go toolchain. Download the prebuilt Linux binary from the mvdan/sh release instead, mirroring the shellcheck install step already in this job.
- themes/modern-t: use -n instead of ! -z (SC2236) - themes/powerturk: suppress SC2120 for _swd's unused optional path-override argument, matching the existing disable-comment convention already used in this file
Local shfmt was an apt-packaged 2022 build (Go 1.17.3) that predates this formatting rule (space after ! inside arithmetic contexts), so it never caught this. Verified against the same shfmt v3.14.0 the CI lint job now installs.
seefood
deleted the
ci/drop-go-for-shfmt-binary/001-install-shfmt-binary
branch
August 30, 2026 16:18
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.
Summary
lintjob set up a Go toolchain (pinned togo-version: 1.25.8) solely togo install mvdan.cc/sh/v3/cmd/shfmt@latest, which builds shfmt from source on every run and is slow.v3.14.0, mirroring the existing shellcheck install step in the same job.actions/setup-gostep entirely since nothing else in the job needs Go.Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"— YAML is well-formedpre-commithooks (includingzizmorActions security linter) pass on the changed filelintjob still installs and runsshfmtsuccessfully