Skip to content

Commit 7d7bb73

Browse files
committed
v0.0.12 - RST213, RST214 and RST215 with tests
These are all examples fitting the pattern: 'Inline %s start-string without end-string.' Raised in docutils/parsers/rst/states.py Noted in passing on GitHub issue #18.
1 parent f8e6a83 commit 7d7bb73

5 files changed

Lines changed: 53 additions & 1 deletion

File tree

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ RST208 Option list ends without a blank line; unexpected unindent.
100100
RST210 Inline strong start-string without end-string.
101101
RST211 Blank line required after table.
102102
RST212 Title underline too short.
103+
RST213 Inline emphasis start-string without end-string.
104+
RST214 Inline literal start-string without end-string.
105+
RST215 Inline interpreted text or phrase reference start-string without end-string.
103106
RST299 Previously unseen warning, not yet assigned a unique code.
104107
====== =======================================================================
105108

@@ -213,6 +216,7 @@ Version History
213216
======= ========== ===========================================================
214217
Version Released Changes
215218
------- ---------- -----------------------------------------------------------
219+
v0.0.12 2019-11-18 - Adds ``RST213``, ``RST214`` and ``RST215``.
216220
v0.0.11 2019-08-07 - Configuration options to define additional directives and
217221
roles (e.g. from Sphinx) for ``RST303`` and ``RST304``.
218222
v0.0.10 2019-06-17 - Fixed flake8 "builtins" parameter warning (contribution

flake8_rst_docstrings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def tokenize_open(filename):
139139
import restructuredtext_lint as rst_lint
140140

141141

142-
__version__ = "0.0.11"
142+
__version__ = "0.0.12"
143143

144144

145145
log = logging.getLogger(__name__)
@@ -171,6 +171,9 @@ def tokenize_open(filename):
171171
"Inline strong start-string without end-string.": 10,
172172
"Blank line required after table.": 11,
173173
"Title underline too short.": 12,
174+
"Inline emphasis start-string without end-string.": 13,
175+
"Inline literal start-string without end-string.": 14,
176+
"Inline interpreted text or phrase reference start-string without end-string.": 15,
174177
}
175178

176179
# Level 3 - error

tests/RST213/emphasis.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
RST uses single asterisks for **emphasis**, which is
4+
normally rendered as **italics**.
5+
6+
Here *emphasis is missing a closing asterisk.
7+
8+
That is considered to be an error, and should fail::
9+
10+
$ flake8 --select RST RST213/emphasis.py
11+
RST213/emphasis.py:7:1: RST213 Inline emphasis start-string without end-string.
12+
13+
"""
14+
15+
print("Hello world")

tests/RST214/literal.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
RST uses double backticks for ``literals`` like code
4+
snippets.
5+
6+
Here ``literal is missing the closing backticks.
7+
8+
That is considered to be an error, and should fail::
9+
10+
$ flake8 --select RST RST214/literal.py
11+
RST214/literal.py:7:1: RST214 Inline emphasis start-string without end-string.
12+
13+
"""
14+
15+
print("Hello world")

tests/RST215/backticks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Print 'Hello world' to the terminal.
2+
3+
RST uses single backticks or back-quotes for various
4+
things including interpreted text roles and references.
5+
6+
Here `example is missing a closing backtick.
7+
8+
That is considered to be an error, and should fail::
9+
10+
$ flake8 --select RST RST215/backticks.py
11+
RST215/backticks.py:7:1: RST215 Inline interpreted text or phrase reference start-string without end-string.
12+
13+
"""
14+
15+
print("Hello world")

0 commit comments

Comments
 (0)