mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
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.
This commit is contained in:
1 file changed
+7
-2
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user