From 0181f8cc881be2afc1a32409f9962bd06fe551e8 Mon Sep 17 00:00:00 2001 From: "kirill.chalov" Date: Fri, 19 Jan 2024 13:44:36 +0800 Subject: [PATCH] docs(sphinx-lint): Add sphinx-lint to pre-commit Sphinx-lint helps in linting simple formatting issues with virtually no false positives, such as trailing spaces, missing final newlines, presence of tabs, absence of spaces and backticks around roles, etc. --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 91ab3296bd..045c8ff965 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -225,3 +225,9 @@ repos: hooks: - id: validate-sbom-manifest stages: [post-commit] + - repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v0.9.1 + hooks: + - id: 'sphinx-lint' + name: Lint rST files in docs folder using Sphinx Lint + files: ^(docs/en|docs/zh_CN)/.*\.(rst|inc)$