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]
Pre-commit Hook with Extras
To use rstcheck in a Git pre-commit hook with optional features:
Install pre-commit:
pip install pre-commit
Add to .pre-commit-config.yaml:
- repo: https://github.com/rstcheck/rstcheck rev: main # should be replaced with the current verison hooks: - id: rstcheck additional_dependencies: ['rstcheck[sphinx,toml]']Run pre-commit install to activate.
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.
Metadata
Release files for rstcheck 6.3.0
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-6.3.0.tar.gz | 30.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rstcheck-6.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.9 kB
Release files / rstcheck-6.3.0.tar.gz
| Download URL | rstcheck-6.3.0.tar.gz |
|---|---|
| Size | 30.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
583072b43939627b1b0f4492e8af2587092efc1fb5e9f0228fa2df9ea3b44873
|
|
BLAKE2b-256 checksum How to use checksums |
0a3e54182f5a310e0e2eb287170eb590bb93011161e28e51aa499120ab5c9318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / rstcheck-6.3.0-py3-none-any.whl
| Download URL | rstcheck-6.3.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c1d8753b5dc01c33d114711552b2c4855fde00e0713f5a8341d7aaab2777058
|
|
BLAKE2b-256 checksum How to use checksums |
44138bdf4e9f028e147ebabd8e093d30b0bc6e70ebbcfa9dbd9b93861e7315cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|