Doc8¶
New in version 2.0.
Doc8 is an opinionated style checker for reStructuredText-based documentation (including Sphinx-compatible documentation).
See the doc8 documentation for the lists of checks that are performed.
Supported File Types¶
The following are supported by this tool:
reStructuredText:
*.rst
Installation¶
doc8 can be installed on most systems by running:
$ pip install doc8
It may also be available in your system’s package manager.
Configuration¶
Doc8 Location¶
If the doc8 command is in a non-standard location, and can’t
be found in Review Bot’s PATH
environment variable, then you’ll
need to specify the path in the
Review Bot worker config file:
exe_paths = {
'doc8': '/path/to/doc8',
}
You will need to restart the Review Bot worker after making this change.
Enabling Doc8 in Review Board¶
First, you’ll need to add a Review Bot configuration in Review Board (see Tool Configurations).
The following configuration options are available:
- Maximum line length (required):
The maximum length allowed for lines. Any lines longer than this length will cause an issue to be filed.
The default is 79.
This is equivalent to doc8 --max-line-length=....
- Encoding (required):
The encoding used for reStructuredText files.
reStructuredText files using any other encoding may cause parsing problems.
The default is
utf-8
.This is equivalent to doc8 --file-encoding=....