[llvm] [Github][CI] Add `doc8` for clang-tidy documentation formatting (PR #168827)

Baranov Victor via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 04:24:08 PST 2025


================
@@ -71,25 +71,43 @@ jobs:
                 -DLLVM_INCLUDE_TESTS=OFF \
                 -DCLANG_INCLUDE_TESTS=OFF \
                 -DCMAKE_BUILD_TYPE=Release
-          
+
           ninja -C build \
                 clang-tablegen-targets \
                 genconfusable               # for "ConfusableIdentifierCheck.h"
 
-      - name: Run code linter
+      - name: Install linter dependencies
+        run: |
+          pip install doc8 --break-system-packages
+          echo "$HOME/.local/bin" >> $GITHUB_PATH
+
+      - name: Run clang-tidy linter
         env:
           GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
           CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
         run: |
           echo "[]" > comments &&
           python3 llvm/utils/git/code-lint-helper.py \
+            --linter clang-tidy \
             --token ${{ secrets.GITHUB_TOKEN }} \
             --issue-number $GITHUB_PR_NUMBER \
             --start-rev HEAD~1 \
             --end-rev HEAD \
             --verbose \
             --changed-files "$CHANGED_FILES"
-      
+
+      - name: Run doc8 linter
+        env:
+          GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
+        run: |
+          python3 llvm/utils/git/code-lint-helper.py \
+            --linter doc8 \
+            --token ${{ secrets.GITHUB_TOKEN }} \
+            --issue-number $GITHUB_PR_NUMBER \
+            --start-rev HEAD~1 \
+            --end-rev HEAD \
+            --verbose
----------------
vbvictor wrote:

We should do it in one step inside `code-lint-helper.py`. It should be a generic helper to accumulate all linters.
Look at formatting job that run multiple linters under one `code-format-helper.py` invokation

https://github.com/llvm/llvm-project/pull/168827


More information about the llvm-commits mailing list