From ca07b0669ae0bcd5127515906ad254f8667ab8fd Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Sat, 10 Oct 2026 16:25:09 +0800 Subject: [PATCH] Run the shared quality checks on pull requests Call the reusable quality-check workflow of TirSystem/github-action for the shell files: shellcheck and shfmt -d. Add switch_case_indent to the [*.sh] section of .editorconfig so that shfmt, which reads it, agrees with the style the project already uses (shfmt -i 2 -ci in tests/run-tests.sh). --- .editorconfig | 3 +++ .gitea/workflows/quality.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .gitea/workflows/quality.yml diff --git a/.editorconfig b/.editorconfig index 8484116..6606c67 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,6 @@ end_of_line = lf insert_final_newline = true charset = utf-8 trim_trailing_whitespace = true + +[*.sh] +switch_case_indent = true diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml new file mode 100644 index 0000000..ca054af --- /dev/null +++ b/.gitea/workflows/quality.yml @@ -0,0 +1,18 @@ +name: Quality + +# Calls the shared quality-check workflow of TirSystem/github-action +# (contract: ADR-0005 there). It runs shellcheck and shfmt on the tracked +# shell files and changes no file. Configuration comes from .shellcheckrc +# and .editorconfig in this repository. +on: + pull_request: + push: + branches: [ main ] + +jobs: + quality: + permissions: + contents: read + uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@main + with: + languages: shell -- 2.54.0