Run the shared quality checks on pull requests #76

Merged
Tirsvad merged 1 commits from adopt-shared-quality-checks into main 2026-10-10 21:21:46 +02:00
Owner

Adopts the shared quality-check workflow of TirSystem/github-action (issue TirSystem/github-action#18, MIL-003 task 4).

Changes

  • .gitea/workflows/quality.yml: calls TirSystem/github-action/.gitea/workflows/quality-checks.yml@main for languages: shell on pull requests and on push to main. It runs shellcheck and shfmt -d on the tracked *.sh files, changes no file and needs no secret.
  • .editorconfig: a [*.sh] section with switch_case_indent = true.

Why the .editorconfig line

A trial run on the unchanged repository (39 shell files):

  • shellcheck passed, using this repository's .shellcheckrc (external-sources, source-path=SCRIPTDIR).
  • shfmt -d failed on 10 files, all the same difference: the shared workflow runs shfmt with its defaults, which do not indent case patterns, while this project's own check is shfmt -i 2 -ci (tests/run-tests.sh). shfmt reads .editorconfig, so switch_case_indent = true makes it agree with the project's style, with no change to any script.
  • After that line the trial run passed (PASS shellcheck, PASS shfmt -d, All selected checks passed.).

Notes

  • languages: shell because the repository has no Python files; the default (python,shell) would also pass, with a notice for Python.
  • Reported paths are relative to the working directory, which is the repository root here.
  • No file under src/ or tests/ changes, so the plan gate does not apply. Not merged by me.
Adopts the shared quality-check workflow of `TirSystem/github-action` (issue TirSystem/github-action#18, MIL-003 task 4). ## Changes - `.gitea/workflows/quality.yml`: calls `TirSystem/github-action/.gitea/workflows/quality-checks.yml@main` for `languages: shell` on pull requests and on push to `main`. It runs `shellcheck` and `shfmt -d` on the tracked `*.sh` files, changes no file and needs no secret. - `.editorconfig`: a `[*.sh]` section with `switch_case_indent = true`. ## Why the `.editorconfig` line A trial run on the unchanged repository (39 shell files): - `shellcheck` passed, using this repository's `.shellcheckrc` (`external-sources`, `source-path=SCRIPTDIR`). - `shfmt -d` failed on 10 files, all the same difference: the shared workflow runs shfmt with its defaults, which do not indent `case` patterns, while this project's own check is `shfmt -i 2 -ci` (`tests/run-tests.sh`). shfmt reads `.editorconfig`, so `switch_case_indent = true` makes it agree with the project's style, with no change to any script. - After that line the trial run passed (`PASS shellcheck`, `PASS shfmt -d`, `All selected checks passed.`). ## Notes - `languages: shell` because the repository has no Python files; the default (`python,shell`) would also pass, with a notice for Python. - Reported paths are relative to the working directory, which is the repository root here. - No file under `src/` or `tests/` changes, so the plan gate does not apply. Not merged by me.
Tirsvad added 1 commit 2026-10-10 10:25:29 +02:00
Run the shared quality checks on pull requests
Quality checks / quality-checks (pull_request) Successful in 22s
Quality / quality (pull_request) Successful in 22s
ca07b0669a
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).
Tirsvad merged commit 6a5da649da into main 2026-10-10 21:21:46 +02:00
Tirsvad deleted branch adopt-shared-quality-checks 2026-10-11 03:48:56 +02:00
Sign in to join this conversation.