Skip to content

Commit 3ea2c6b

Browse files
committed
RST306 test case
1 parent f7c3aa3 commit 3ea2c6b

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/RST306/unknown_target.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
Here's where the hyperlink-name_ is used, the target definition
4+
is next.
5+
6+
.. _hyperlink-name: Here's where the hyperlink target is defined.
7+
8+
So far so good, but what if the definition is not in the same
9+
docstring fragment - it could be in an included footer?
10+
11+
Here a missing-link_ hyperlink is used, so this docstring in
12+
isolation should fail validation::
13+
14+
$ flake8 --select RST RST306/unknown_target.py
15+
RST306/unknown_target.py:12:1: RST306 Unknown target name: "missing-link".
16+
17+
"""
18+
19+
print("Hello world")

0 commit comments

Comments
 (0)