From 24ef709ef6843dab922003deb38efc958e3ef3f8 Mon Sep 17 00:00:00 2001 From: Jacob Schantli Date: Wed, 4 Nov 2026 21:19:27 -0700 Subject: [PATCH] shellcheck.yml --- .gitea/workflows/shellcheck.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/shellcheck.yml diff --git a/ .gitea/workflows/shellcheck.yml b/ .gitea/workflows/shellcheck.yml new file mode 100644 index 0000000..286bec9 --- /dev/null +++ b/ .gitea/workflows/shellcheck.yml @@ -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 \ No newline at end of file