File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ RST212 Title underline too short.
103103RST213 Inline emphasis start-string without end-string.
104104RST214 Inline literal start-string without end-string.
105105RST215 Inline interpreted text or phrase reference start-string without end-string.
106+ RST216 Multiple roles in interpreted text (both prefix and suffix present; only one allowed).
106107RST299 Previously unseen warning, not yet assigned a unique code.
107108====== =======================================================================
108109
@@ -216,7 +217,7 @@ Version History
216217======= ========== ===========================================================
217218Version Released Changes
218219------- ---------- -----------------------------------------------------------
219- v0.0.12 2019-11-18 - Adds ``RST213 ``, ``RST214 `` and ``RST215 ``.
220+ v0.0.12 2019-11-18 - Adds ``RST213 ``, ``RST214 ``, `` RST215 `` and ``RST216 ``.
220221v0.0.11 2019-08-07 - Configuration options to define additional directives and
221222 roles (e.g. from Sphinx) for ``RST303 `` and ``RST304 ``.
222223v0.0.10 2019-06-17 - Fixed flake8 "builtins" parameter warning (contribution
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ def tokenize_open(filename):
174174 "Inline emphasis start-string without end-string." : 13 ,
175175 "Inline literal start-string without end-string." : 14 ,
176176 "Inline interpreted text or phrase reference start-string without end-string." : 15 ,
177+ "Multiple roles in interpreted text (both prefix and suffix present; only one allowed)." : 16 ,
177178}
178179
179180# Level 3 - error
Original file line number Diff line number Diff line change 1+ """Print 'Hello world' to the terminal.
2+
3+ RST uses single backticks or back-quotes for various things including
4+ interpreted text roles and references.
5+
6+ Without a semi-colon prefix or suffix, `example` has the default role.
7+ A prefix like :code:`example` or a suffix like `example`:math: is allowed.
8+
9+ However, :code:`example`:math: with both prefix and suffix is considered to be
10+ an error and should fail validation:
11+
12+ $ flake8 --select RST RST216/roles.py
13+ RST216/roles.py:10:1: RST216 Multiple roles in interpreted text (both prefix and suffix present; only one allowed).
14+
15+ """
16+
17+ print ("Hello world" )
You can’t perform that action at this time.
0 commit comments