Skip to content
Proyectos

Acerca de

Checks syntax of reStructuredText and code blocks nested within it

Herramientas de desarrollo

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

rstcheck

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

From pip

$ pip install rstcheck

To use pyproject.toml for configuration:

$ pip install rstcheck[toml]

To add sphinx support:

$ pip install rstcheck[sphinx]

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.

  • Bash
  • Doctest
  • C (C99)
  • C++ (C++11)
  • JSON
  • XML
  • Python
  • reStructuredText

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.

Explorar proyectos relacionados

Cargando…