From b83c5b2c83967005819937c08159636faf04ebac Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Mon, 27 Jan 2025 02:04:43 +0400 Subject: pre-commit: Add `pygrep-hooks` repo and 3 hooks to check RST files --- .pre-commit-config.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29f9841..fccc0be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -86,6 +86,21 @@ repos: # NOTE Looks like `bad-dedent` gives too many false-positives. args: ['--disable', 'bad-dedent'] + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: rst-backticks + # NOTE The `productionlist` directive can give false-positives + exclude: >- + (?x)Help/( + dev/maint\.rst + | manual/cmake-(developer|language)\.7\.rst + | variable/CMAKE_MESSAGE_CONTEXT\.rst + ) + | Tests/CMakeLib/testRST\.rst + - id: rst-directive-colons + - id: rst-inline-touching-normal + - repo: https://github.com/codespell-project/codespell rev: v2.4.0 hooks: -- cgit v0.12