From af4a193b43b0ec07febee2efb46c5e1ce4488a81 Mon Sep 17 00:00:00 2001 From: Ruslan Mstoi Date: Mon, 22 Jan 2024 17:35:21 +0200 Subject: [PATCH] build: add shell script linter workflow Implement workflow to to run static analysis and linting of all shell scripts by using shfmt and shellcheck. Fixes: #5396 Signed-off-by: Ruslan Mstoi --- .github/workflows/shlint.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/shlint.yaml diff --git a/.github/workflows/shlint.yaml b/.github/workflows/shlint.yaml new file mode 100644 index 000000000..b1b78eb1f --- /dev/null +++ b/.github/workflows/shlint.yaml @@ -0,0 +1,20 @@ +name: Shell scripts check + +on: + pull_request: + push: + branches: + - main + +jobs: + sh-checker: + name: Check shell scripts + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Run the shell script checkers + uses: luizm/action-sh-checker@master + env: + SHFMT_OPTS: -i 4 -d + SHELLCHECK_OPTS: -x --source-path scripts