From f3f4730e69c21144ca66502471849274ecc490bb Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 10 Jan 2025 08:07:52 -0500 Subject: [PATCH] build: more pre-commit checks I tried `check-hooks-apply`, but it complained that check-symlinks doesn't apply because I have no symlinks. That's dumb. I want to protect against future additions of bad symlinks. I tried `rst-backticks`, but it complained about every single-backticked thing in my docs. Sphinx allows single backticks, they just mean something different than code. --- .pre-commit-config.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 466833a9e..7e20a1034 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,3 +14,18 @@ repos: exclude: "(status\\.json|\\.min\\.js)$" - id: trailing-whitespace exclude: "stress_phystoken|\\.py,cover$" + + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: rst-directive-colons + - id: rst-inline-touching-normal + + - repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v1.0.0 + hooks: + - id: sphinx-lint + + - repo: meta + hooks: + - id: check-useless-excludes