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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ jobs:
run: sudo apt install shellcheck
- name: Lint sources with shellcheck
run: |
# Recursively find all shell scripts in the build-scripts directory with a shebang
grep -Erl '^(#!/(bin|usr/bin)/(env )?(sh|bash))' build-scripts/ | while read -r file; do
shellcheck --external-sources --source-path=build-scripts "$file"
done
./ci/lint.sh
11 changes: 11 additions & 0 deletions ci/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
shellcheck_dirs() {
grep -Erl '^(#!/(bin|usr/bin)/(env )?(sh|bash))' "$1" | while read -r file; do
shellcheck --external-sources --source-path=build-scripts "$file"
done
}

shellcheck_dirs build-scripts/

# some dirs are "dirty" aka need some work so don't fail on those yet
shellcheck_dirs ci/ packaging/ || true