Skip to main content

General

Maintenance - intended License Semantic Versioning - 2.0.0

Read the Docs - Build Status (latest)

CI

Test status Documentation status QA status pre-commit status

PyPI

PyPI - Package latest release PyPI - Supported Python Versions PyPI - Supported Implementations

PyPI - Format PyPI - Monthly downloads

Github

Github - Latest Release GitHub - Last Commit

Github - Stars Github - Forks Github - Contributors Github - Watchers

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:

  1. Install pre-commit:

    pip install pre-commit
  2. 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]']
  3. 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)

Source distribution for rstcheck 6.3.0
File Size Uploaded
rstcheck-6.3.0.tar.gz 30.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rstcheck 6.3.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

6.3.0 This release

2 release files

6.2.5

2 release files

6.2.4

2 release files

6.2.3

2 release files

6.2.2

2 release files

6.2.1

2 release files

6.2.0

2 release files

6.1.2

2 release files

6.1.1

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.0.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.1

1 release file

3.3

1 release file

3.2

1 release file

3.1

1 release file

3.0.1

1 release file

3.0

1 release file

2.2

1 release file

2.1

1 release file

2.0

1 release file

1.5.1

1 release file

1.5

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4

1 release file

1.3.1

1 release file

1.3

1 release file

1.2.1

1 release file

1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

0.6

1 release file

0.5.1

1 release file

0.5

1 release file

0.4.1

1 release file

0.4

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page