From 60c900fd5229bb59abc5ec0502b40ea6a17a37fc Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 10 Sep 2026 15:09:49 +0200 Subject: [PATCH] ci: run the argument comment checker in the linter workflow The tree is clean now, keep it that way. Run the whole argument-comments suite like the clang-tidy one. Checking only the lines a pull request changed misses comments that go stale when a parameter is renamed, since no caller's line changes then. On four CPUs the suite takes about a minute and a half. meson test reports a test that exits with 77 as skipped, so make sure the libclang bindings are there first. Otherwise a tools tree without them would pass the step without checking anything. While at it, add the script to the mypy and tab checks. --- .github/workflows/linter.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 2a7ff69dadc..78fbf6b0498 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -43,7 +43,7 @@ jobs: - uses: systemd/mkosi@131adaca5eb5f1551bc564ae4497ff940890a374 - name: Check that tabs are not used in Python code - run: sh -c '! git grep -P "\\t" -- src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py' + run: sh -c '! git grep -P "\\t" -- src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py tools/check-argument-comments.py' - name: Build tools tree run: | @@ -58,7 +58,7 @@ jobs: - name: Run mypy run: | mkosi box -- mypy --version - mkosi box -- mypy src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py + mkosi box -- mypy src/core/generate-bpf-delegate-configs.py src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py tools/check-argument-comments.py - name: Run ruff format run: | @@ -86,6 +86,11 @@ jobs: - name: Run clang-tidy run: mkosi box -- meson test -C build --suite=clang-tidy --print-errorlogs --no-stdsplit --quiet + - name: Run argument comment checks + run: | + mkosi box -- python3 -c 'import clang.cindex' + mkosi box -- meson test -C build --suite=argument-comments --print-errorlogs --no-stdsplit --quiet + - name: Run coccinelle checks run: mkosi box -- meson test -C build --suite=coccinelle --print-errorlogs --no-stdsplit