Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/lint-and-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,32 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Runs the runner image's shellcheck on tracked shell scripts and on
# executables with no extension whose first line names a shell.
- name: ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
scandir: '.'
run: |
if ! command -v shellcheck >/dev/null; then
echo "::error::This runner has no shellcheck. GitHub's Ubuntu images carry it; on another runner, install it first."
exit 1
fi
shellcheck --version
files=()
while IFS= read -r -d '' f; do
[[ -f $f && ! -L $f ]] || continue
case ${f##*/} in
*.sh | *.bash | *.ksh | *.shlib) files+=("$f") ;;
*.*) ;;
*)
if [[ -x $f ]] && head -n1 "$f" | grep -Eq '^#! */[^ ]*/(env *)?[abk]*sh'; then
files+=("$f")
fi
;;
esac
done < <(git ls-files -z)
if ((${#files[@]})); then
printf 'Checking %s\n' "${files[@]}"
shellcheck --format=gcc "${files[@]}"
fi

lint-workflows:
name: Lint GitHub Actions workflows
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The `v0.0.0` tag is a baseline, not a release: it marks where versioning starts

## [Unreleased]

### Fixed

- **The shell lint runs the runner image's shellcheck instead of downloading one.**

## [0.2.4] - 2026-11-30

### Fixed
Expand Down
Loading