From c45812ed936f6cf063f36ac4efa57e50228b0aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Tue, 2 Jul 2024 20:52:05 +0200 Subject: [PATCH] Merge pull request #12562 from webknjaz/maintenance/docs/user-role-validation (cherry picked from commit e8aee21384747bc75a393f24b7cd3571f1d7650a) --- .pre-commit-config.yaml | 8 ++++++++ changelog/12562.contrib.rst | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 changelog/12562.contrib.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f000ba0fa..4fbe5fe51 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -102,6 +102,14 @@ repos: ) $ files: ^changelog/ + - id: changelogs-user-role + name: Changelog files should use a non-broken :user:`name` role + language: pygrep + entry: :user:([^`]+`?|`[^`]+[\s,]) + pass_filenames: true + types: + - file + - rst - id: py-deprecated name: py library is deprecated language: pygrep diff --git a/changelog/12562.contrib.rst b/changelog/12562.contrib.rst new file mode 100644 index 000000000..0d3049598 --- /dev/null +++ b/changelog/12562.contrib.rst @@ -0,0 +1,2 @@ +Possible typos in using the ``:user:`` RST role is now being linted +through the pre-commit tool integration -- by :user:`webknjaz`.