Add the reusable quality-check workflows for C++ and C# (MIL-007 tasks 4 and 5) #110

Open
Tirsvad wants to merge 6 commits from mil-007-cpp-csharp-workflows into main
Owner

MIL-007 tasks 4 and 5 (#98 and #99): the reusable quality-check workflows for C++ and C#, as ADR-0008 decides.

C and C++: quality-checks-cpp.yml and tools/quality-checks-cpp.sh

  • clang-format --dry-run -Werror and clang-tidy on the tracked C and C++ files, installed from PyPI at exact versions (inputs clang-format-version 23.1.3, clang-tidy-version 22.1.8). No cppcheck.
  • Inputs: working-directory, std (default c++20), compile-commands-dir, tools-ref. .c files are checked as C17.
  • A missing .clang-format (searched upward to the top of the repository) or a compile-commands-dir without compile_commands.json is a [configuration] failure; a repository without C or C++ files passes with a notice.

C#: quality-checks-csharp.yml and tools/quality-checks-csharp.sh

  • dotnet format --verify-no-changes and dotnet build -warnaserror on a .NET SDK installed at an exact version with the official dotnet-install.sh (input dotnet-sdk-version, default 10.0.401; anything below 10, a channel or a range is a [configuration] failure).
  • Inputs: working-directory, project (empty: the single solution, else the single project), tools-ref. Several candidates, or C# files without a solution or project, is a [configuration] failure that names them.

Common: least-privilege permissions, no secret, no embedded script (the workflow fetches the script at tools-ref and runs one command per step), every tool runs even when another failed, FAIL lines and ::group:: per tool as in quality-checks.yml.

Tests: 83 new offline tests with stub tools (394 in total, all pass); both scripts are clean under shellcheck and shfmt -i 2 -ci. The tests found and fixed an endless loop in the search for .clang-format. The test file was tidied by the python-developer agent as the project rule requires, and its type annotations and line lengths re-checked.

Not verified live: neither workflow has run on a real runner or a real project yet; that is task #101 (adoption with a seeded failure), and criteria 3 and 4 of MIL-007 are not claimed here.

Home (README, Danish and Malay pages) lists both workflows with a PlantUML diagram each (a test requires it). The guides and the dedicated wiki pages are task #100.

Wiki pages changed: Home (en, da, ms).

Closes #98
Closes #99

MIL-007 tasks 4 and 5 (#98 and #99): the reusable quality-check workflows for C++ and C#, as ADR-0008 decides. **C and C++: `quality-checks-cpp.yml` and `tools/quality-checks-cpp.sh`** - `clang-format --dry-run -Werror` and `clang-tidy` on the tracked C and C++ files, installed from PyPI at exact versions (inputs `clang-format-version` 23.1.3, `clang-tidy-version` 22.1.8). No `cppcheck`. - Inputs: `working-directory`, `std` (default `c++20`), `compile-commands-dir`, `tools-ref`. `.c` files are checked as C17. - A missing `.clang-format` (searched upward to the top of the repository) or a `compile-commands-dir` without `compile_commands.json` is a `[configuration]` failure; a repository without C or C++ files passes with a notice. **C#: `quality-checks-csharp.yml` and `tools/quality-checks-csharp.sh`** - `dotnet format --verify-no-changes` and `dotnet build -warnaserror` on a .NET SDK installed at an exact version with the official `dotnet-install.sh` (input `dotnet-sdk-version`, default `10.0.401`; anything below 10, a channel or a range is a `[configuration]` failure). - Inputs: `working-directory`, `project` (empty: the single solution, else the single project), `tools-ref`. Several candidates, or C# files without a solution or project, is a `[configuration]` failure that names them. **Common:** least-privilege permissions, no secret, no embedded script (the workflow fetches the script at `tools-ref` and runs one command per step), every tool runs even when another failed, `FAIL` lines and `::group::` per tool as in `quality-checks.yml`. **Tests:** 83 new offline tests with stub tools (394 in total, all pass); both scripts are clean under shellcheck and `shfmt -i 2 -ci`. The tests found and fixed an endless loop in the search for `.clang-format`. The test file was tidied by the `python-developer` agent as the project rule requires, and its type annotations and line lengths re-checked. **Not verified live:** neither workflow has run on a real runner or a real project yet; that is task #101 (adoption with a seeded failure), and criteria 3 and 4 of MIL-007 are not claimed here. Home (README, Danish and Malay pages) lists both workflows with a PlantUML diagram each (a test requires it). The guides and the dedicated wiki pages are task #100. Wiki pages changed: Home (en, da, ms). Closes #98 Closes #99
Tirsvad added 2 commits 2026-10-11 10:20:18 +02:00
Task: MIL-007#4

Task: MIL-007#5
Give the C++ and C# workflows a timeout and an exact checkout tag
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 23s
77f91cf066
Task: MIL-007#4

Task: MIL-007#5
Tirsvad force-pushed mil-007-cpp-csharp-workflows from a26f44c267 to 77f91cf066 2026-10-11 10:20:18 +02:00 Compare
Tirsvad added 2 commits 2026-10-11 10:26:32 +02:00
Add the guides and wiki pages for the C and C++ and C# quality checks
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 20s
ec9a8d6f4a
Task: MIL-007#6
Merge pull request 'Add the guides and wiki pages for C++ and C# quality checks (MIL-007 task 6)' (#113) from mil-007-guides into mil-007-cpp-csharp-workflows
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 20s
bf4d090fb3
Reviewed-on: #113
Tirsvad added 1 commit 2026-10-11 10:32:50 +02:00
Run clang-tidy with default checks when the project has none
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 22s
81866d8dac
Task: MIL-007#4
Tirsvad added 1 commit 2026-10-11 10:36:51 +02:00
Make every clang-tidy finding an error
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
Validate workflows / validate (pull_request) Successful in 23s
84383eafe9
Task: MIL-007#4
All checks were successful
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
Required
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Required
Validate workflows / validate (pull_request) Successful in 23s
Required
Details
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin mil-007-cpp-csharp-workflows:mil-007-cpp-csharp-workflows
git checkout mil-007-cpp-csharp-workflows
Sign in to join this conversation.