Skip to content

Commit a9e238c

Browse files
committed
chore(ci): inline rst checking hooks
This makes it easier to review why something is wrong.
1 parent f5d3a64 commit a9e238c

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ repos:
9292
- id: djlint-django
9393
types_or: [html, text]
9494
files: ^weblate/.*templates/.*\.(txt|html|tmx)$
95-
- repo: https://github.com/pre-commit/pygrep-hooks
96-
rev: v1.10.0
97-
hooks:
98-
- id: rst-directive-colons
99-
- id: rst-inline-touching-normal
10095
- repo: local
10196
hooks:
10297
- id: rst-double-space
@@ -129,6 +124,18 @@ repos:
129124
args: [--multiline]
130125
entry: ^\.\. seealso::\n\n( *[:`*][^\n]*\n)* *[:`*][^\n]*,
131126
language: pygrep
127+
- id: rst-directive-colons
128+
name: rst directives end with two colons
129+
description: Detect mistake of rst directive not ending with double colon or space before the double colon
130+
entry: ^\s*\.\. [a-z]+(| | :):$
131+
language: pygrep
132+
types: [rst]
133+
- id: rst-inline-touching-normal
134+
name: rst ``inline code`` next to normal text
135+
description: Detect mistake of inline code touching normal text in rst
136+
entry: \w``\w
137+
language: pygrep
138+
types: [rst]
132139
- id: py-join-comma
133140
name: Localized comma in join
134141
types: [python]

0 commit comments

Comments
 (0)