shellcheck.yml
This commit is contained in:
1 parent
d3f2544135
commit
24ef709ef6
1 file changed
+32
@@ -0,0 +1,32 @@
|
|||||||
|
name: ShellCheck
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install ShellCheck
|
||||||
|
run: |
|
||||||
|
if ! command -v shellcheck >/dev/null; then
|
||||||
|
SUDO=""
|
||||||
|
command -v sudo >/dev/null && SUDO=sudo
|
||||||
|
$SUDO apt-get update -qq
|
||||||
|
$SUDO apt-get install -y -qq shellcheck
|
||||||
|
fi
|
||||||
|
shellcheck --version
|
||||||
|
|
||||||
|
- name: Syntax check
|
||||||
|
run: |
|
||||||
|
for f in *.sh; do
|
||||||
|
echo "bash -n $f"
|
||||||
|
bash -n "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: ShellCheck
|
||||||
|
run: shellcheck --severity=warning *.sh
|
||||||
Reference in new issue
Block a user