Skip to content

Commit ab10547

Browse files
committed
Add docrun pre-commit hooks
1 parent b277d65 commit ab10547

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.pre-commit-config.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ repos:
6666
types_or: [python, toml]
6767
pass_filenames: false
6868

69+
- id: mypy-docs
70+
name: mypy-docs
71+
stages: [push]
72+
entry: doccmd --language=python --command="mypy"
73+
language: system
74+
types_or: [markdown, rst, python, toml]
75+
6976
- id: check-manifest
7077
name: check-manifest
7178
stages: [push]
@@ -81,6 +88,13 @@ repos:
8188
types_or: [python, toml]
8289
pass_filenames: false
8390

91+
- id: pyright-docs
92+
name: pyright-docs
93+
stages: [push]
94+
entry: doccmd --language=python --command="pyright"
95+
language: system
96+
types_or: [markdown, rst, python, toml]
97+
8498
- id: vulture
8599
name: vulture
86100
entry: python -m vulture --min-confidence 100 --exclude .eggs
@@ -107,30 +121,61 @@ repos:
107121
stages: [manual]
108122
pass_filenames: false
109123

124+
- id: pylint-docs
125+
name: pylint-docs
126+
entry: doccmd --language=python --command="pylint" --lowercase-file-name
127+
language: system
128+
stages: [manual]
129+
types_or: [markdown, rst, python, toml]
130+
110131
- id: ruff-check
111132
name: Ruff check
112133
entry: python -m ruff check
113134
language: system
114135
types_or: [python]
115136

137+
- id: ruff-check-docs
138+
name: Ruff check docs
139+
entry: doccmd --language=python --command="ruff check"
140+
language: system
141+
types_or: [markdown, rst]
142+
116143
- id: ruff-format-diff
117144
name: Ruff format diff
118145
entry: python -m ruff format --diff
119146
language: system
120147
types_or: [python]
121148

149+
- id: ruff-format-diff-docs
150+
name: Ruff format diff docs
151+
entry: doccmd --language=python --no-pad-file --command="ruff format --diff"
152+
language: system
153+
types_or: [markdown, rst]
154+
122155
- id: ruff-check-fix
123156
name: Ruff check fix
124157
entry: python -m ruff check --fix
125158
language: system
126159
types_or: [python]
127160

161+
- id: ruff-check-fix-docs
162+
name: Ruff check fix docs
163+
entry: doccmd --language=python --command="ruff check --fix"
164+
language: system
165+
types_or: [markdown, rst]
166+
128167
- id: ruff-format-fix
129168
name: Ruff format
130169
entry: python -m ruff format
131170
language: system
132171
types_or: [python]
133172

173+
- id: ruff-format-fix-docs
174+
name: Ruff format docs
175+
entry: doccmd --language=python --no-pad-file --command="ruff format"
176+
language: system
177+
types_or: [markdown, rst]
178+
134179
- id: doc8
135180
name: doc8
136181
entry: python -m doc8
@@ -143,6 +188,12 @@ repos:
143188
language: system
144189
types_or: [python]
145190

191+
- id: interrogate-docs
192+
name: interrogate docs
193+
entry: doccmd --language=python --command="interrogate"
194+
language: system
195+
types_or: [markdown, rst]
196+
146197
- id: pyproject-fmt-check
147198
name: pyproject-fmt check
148199
entry: pyproject-fmt --check

0 commit comments

Comments
 (0)