🧪 Lint for typos in `:user:` RST role
It is easy to forget backticks in change note bylines. It's happened in #12531 already, requiring a hotfix in #12560. The pre-commit based check idea is coming from the Tox project and have been battle-tested in aiohttp, CherryPy, and other ecosystems.
This commit is contained in:
parent
51ee3880c7
commit
9c319d6605
|
@ -102,6 +102,14 @@ repos:
|
||||||
)
|
)
|
||||||
$
|
$
|
||||||
files: ^changelog/
|
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
|
- id: py-deprecated
|
||||||
name: py library is deprecated
|
name: py library is deprecated
|
||||||
language: pygrep
|
language: pygrep
|
||||||
|
|
Loading…
Reference in New Issue