Skip to content

Commit 6d833df

Browse files
committed
v0.0.11 with extra RST roles + directives config
1 parent ad6d80a commit 6d833df

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

README.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,44 @@ Note in addition to the ``RST`` prefix alone you can use partial codes
177177
like ``RST2`` meaning ``RST200``, ``RST201``, ... and so on.
178178

179179

180+
Configuration
181+
-------------
182+
183+
We assume you are familiar with `flake8 configuration
184+
<http://flake8.pycqa.org/en/latest/user/configuration.html>`_.
185+
186+
If you are using Sphinx or other extensions to reStructuredText, you will
187+
want to define any additional directives or roles you are using to avoid
188+
false positive ``RST303`` and ``RST304`` violations.
189+
190+
You can set these at the command line if you wish::
191+
192+
$ flake8 --rst-roles class,func,ref --rst-directives envvar,exception ...
193+
194+
We recommend using the following settings in your ``flake8`` configuration,
195+
for example in your ``.flake8``, ``setup.cfg``, or ``tox.ini`` file, e.g.::
196+
197+
[flake8]
198+
rst-roles =
199+
class,
200+
func,
201+
ref,
202+
rst-directives =
203+
envvar,
204+
exception,
205+
206+
Note that flake8 allows splitting the comma separated lists over multiple
207+
lines, and allows including of hash comment lines.
208+
209+
180210
Version History
181211
---------------
182212

183213
======= ========== ===========================================================
184214
Version Released Changes
185215
------- ---------- -----------------------------------------------------------
216+
v0.0.11 2019-08-7 - Configuration options to define additional directives and
217+
roles (e.g. from Sphinx) for ``RST303`` and ``RST304``.
186218
v0.0.10 2019-06-17 - Fixed flake8 "builtins" parameter warning (contribution
187219
from `Ruben, @ROpdebee <https://github.com/ROpdebee>`_).
188220
v0.0.9 2019-04-22 - Checks positive and negative examples in test framework.

flake8_rst_docstrings.py

Lines changed: 1 addition & 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.10"
142+
__version__ = "0.0.11"
143143

144144

145145
log = logging.getLogger(__name__)

0 commit comments

Comments
 (0)