Checks syntax of reStructuredText and code blocks nested within it.
Installation
From pip:
$ pip install --upgrade rstcheck
Supported languages in code blocks
Bash
C (C99)
C++ (C++11)
JSON
Python
reStructuredText
Examples
With bad Python syntax:
====
Test
====
.. code-block:: python
print(
$ rstcheck bad_python.rst bad_python.rst:7: (ERROR/3) (python) unexpected EOF while parsing
With bad C++ syntax:
====
Test
====
.. code-block:: 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.
Options
usage: rstcheck [-h] [--report level] [--ignore language] files [files ...]
Checks code blocks in reStructuredText.
positional arguments:
files files to check
optional arguments:
-h, --help show this help message and exit
--report level report system messages at or higher than level; 1 info, 2
warning, 3 error, 4 severe, 5 none (default: 1)
--ignore language comma-separated list of languages to ignore
Usage in Vim
To check reStructuredText in Vim using Syntastic:
let g:syntastic_rst_checkers = ['rstcheck']
Metadata
Release files for rstcheck 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rstcheck-0.5.1.tar.gz | 6.0 kB | Details |
Release files / rstcheck-0.5.1.tar.gz
| Download URL | rstcheck-0.5.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1f1aaaedd293d80e2b00fe6a5c1fa289700d6a3dd6caa7c75d5308e679c9043
|
|
BLAKE2b-256 checksum How to use checksums |
94e50d99d1e966fd4ccdecd08d92b80df6384fb0e4e30f50885757baf0f193b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |