]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
ci: call shellcheck on the bash script
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 21 Jul 2024 09:48:03 +0000 (11:48 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Jul 2024 09:16:45 +0000 (11:16 +0200)
Sadly, shellcheck does not support zsh [1], and it's not even possible
to evaluate the script with zsh because it fails with:
  _arguments:comparguments:327: can only be called from completion function
So the zsh script shall not be checked.

[1] https://github.com/koalaman/shellcheck/issues/809

.github/workflows/ci.yml

index 2c06e80f5f8569c437aaeb4e68c15f62a102fe2a..3f71fe4f669f42bdd198e5253fd3bfd5d9751b10 100644 (file)
@@ -78,10 +78,11 @@ jobs:
         ./builddir/mkosi -h
         ./builddir/mkosi documentation
 
-    - name: Test shell scripts
+    - name: Run shellcheck on scripts
       run: |
         sudo apt-get update && sudo apt-get install --no-install-recommends shellcheck
         bash -c 'shopt -s globstar; shellcheck bin/mkosi tools/*.sh'
+        bin/mkosi completion bash | shellcheck -
 
     - name: Test man page generation
       run: pandoc -s mkosi.md -o mkosi.1