Skip to content

Commit 73aa976

Browse files
[doc] Add a script and pre-commit hook to add ref to pylint message
1 parent 7be0b8f commit 73aa976

File tree

2 files changed

+399
-0
lines changed

2 files changed

+399
-0
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ repos:
122122
types: [text]
123123
files: ^(doc/whatsnew/fragments)
124124
exclude: doc/whatsnew/fragments/_.*.rst
125+
- id: check-message-references
126+
name: Check pylint message references
127+
entry: python script/check_message_references.py
128+
language: system
129+
args: ["--fix"]
130+
types_or: [python, rst, markdown, text]
131+
files: ^doc/(whatsnew|data/messages)/.*\.rst$
132+
exclude:
133+
\.( doc/development_guide/api/pylint.rst|
134+
doc/development_guide/how_tos/custom_checkers.rst| )$
135+
pass_filenames: true
125136
- repo: https://github.com/rstcheck/rstcheck
126137
rev: "v6.2.5"
127138
hooks:

0 commit comments

Comments
 (0)