Checks syntax of reStructuredText and code blocks nested within it
Project Links
Meta
Author: Steven Myint
Maintainer: Christian Riedel
Requires Python: >=3.9
Classifiers
Topic
- Software Development :: Quality Assurance
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.
Jun 01, 2025
6.2.5
Jul 07, 2024
6.2.4
Jul 07, 2024
6.2.3
Jul 07, 2024
6.2.2
Mar 23, 2024
6.2.1
Sep 09, 2023
6.2.0
Mar 12, 2023
6.1.2
Nov 12, 2022
6.1.1
Aug 14, 2022
6.1.0
Jun 05, 2022
6.0.0.post1
Jun 04, 2022
6.0.0
May 28, 2022
6.0.0rc3
May 26, 2022
6.0.0rc2
May 21, 2022
6.0.0rc1
May 20, 2022
6.0.0a2
May 13, 2022
6.0.0a1
Apr 17, 2022
5.0.0
Apr 16, 2022
4.1.0
Apr 15, 2022
4.0.0
Apr 14, 2022
3.5.0
Apr 12, 2022
3.4.0
Nov 09, 2018
3.3.1
Mar 17, 2018
3.3
Feb 17, 2018
3.2
Mar 08, 2017
3.1
Mar 02, 2017
3.0.1
Dec 19, 2016
3.0
Oct 11, 2016
2.2
Oct 11, 2016
2.1
Jul 27, 2016
2.0
Mar 29, 2016
1.5.1
Feb 03, 2016
1.5
Dec 16, 2015
1.4.2
Aug 16, 2015
1.4.1
Jun 26, 2015
1.4
Apr 14, 2015
1.3.1
Apr 11, 2015
1.3
Apr 11, 2015
1.2.1
Apr 11, 2015
1.2
Apr 05, 2015
1.1.1
Apr 03, 2015
1.1
Mar 14, 2015
1.0
Sep 25, 2014
0.6
Aug 23, 2014
0.5.1
Jun 01, 2014
0.5
May 31, 2014
0.4.1
May 24, 2014
0.4
Apr 12, 2014
0.3.6
Jan 25, 2014
0.3.5
Dec 29, 2013
0.3.4
Dec 28, 2013
0.3.3
Dec 27, 2013
0.3.2