Checks syntax of reStructuredText and code blocks nested within it
Project description
General | |
CI | |
PyPI | |
Github | |
Checks syntax of reStructuredText and code blocks nested within it.
See the full documentation at read-the-docs
Installation
From pip
$ pip install rstcheck
To use pyproject.toml for configuration:
$ pip install rstcheck[toml]
To add sphinx support:
$ pip install rstcheck[sphinx]
Supported languages in code blocks
- Bash
- Doctest
- C (C99)
- C++ (C++11)
- JSON
- XML
- Python
- reStructuredText
Examples
With bad Python syntax:
==== Test ==== .. code:: python print(
$ rstcheck bad_python.rst bad_python.rst:7: (ERROR/3) (python) unexpected EOF while parsing
With bad C++ syntax:
==== Test ==== .. code:: cpp int main() { return x; }
$ rstcheck bad_cpp.rst bad_cpp.rst:9: (ERROR/3) (cpp) error: 'x' was not declared in this scope
With bad syntax in the reStructuredText document itself:
==== Test ===
$ rstcheck bad_rst.rst bad_rst.rst:1: (SEVERE/4) Title overline & underline mismatch.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rstcheck-6.0.0.post1.tar.gz
(17.7 kB
view hashes)
Built Distribution
Close
Hashes for rstcheck-6.0.0.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5230cbb25d0db9c7d27a1a04e0dfe047220206f5e79e11f0110aa82f564399c |
|
MD5 | c93bfcd948c74cd5114bb75248282fc6 |
|
BLAKE2-256 | 02c362f3680e18df189b9f7294582b55cfb8c27bfb4e00c67f08949b77fad79b |