[clang-tools-extra] [llvm] [Github][CI] Introduce `doc8` to `code-lint-helper.py` (PR #172123)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 13 21:58:14 PST 2025


================
@@ -289,8 +291,65 @@ def _clean_clang_tidy_output(self, output: str) -> str:
         return ""
 
 
+class Doc8LintHelper(LintHelper):
+    name: Final = "doc8"
+    friendly_name: Final = "RST documentation linter"
 
-ALL_LINTERS = (ClangTidyLintHelper(),)
+    def instructions(self, files_to_lint: Iterable[str], args: LintArgs) -> str:
+        return f"doc8 -q {' '.join(files_to_lint)}"
+
+    def filter_changed_files(self, changed_files: Sequence[str]) -> Sequence[str]:
+        filtered_files: List[str] = []
+        for filepath in changed_files:
+            _, ext = os.path.splitext(filepath)
----------------
EugeneZelenko wrote:

Will be good idea to put all three conditions into `_should_lint_file` and use `filter(self._should_lint_file, changed_files)` in loop.

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


More information about the llvm-commits mailing list