GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rstcheck/rstcheck: Checks syntax of reStructuredText and code blocks nested within it

BranchesTags
Open more actions menu

Latest commit

 

History

1,405 Commits
1,405 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs/source
docs/source
 
 
src/rstcheck
src/rstcheck
 
 
testing/examples
testing/examples
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.markdownlint-cli2.jsonc
.markdownlint-cli2.jsonc
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.pre-commit-hooks.yaml
.pre-commit-hooks.yaml
 
 
.prettierrc.json
.prettierrc.json
 
 
.pylintrc.spelling.toml
.pylintrc.spelling.toml
 
 
.readthedocs.yaml
.readthedocs.yaml
 
 
.rstcheck.project.cfg
.rstcheck.project.cfg
 
 
.yamllint.yaml
.yamllint.yaml
 
 
AUTHORS.rst
AUTHORS.rst
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.rst
README.rst
 
 
prep_release.py
prep_release.py
 
 
pyproject.toml
pyproject.toml
 
 
spelling_dict.txt
spelling_dict.txt
 
 
tox.ini
tox.ini
 
 

Repository files navigation

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

Contents

  • Installation
    • Pre-commit Hook with Extras
  • Supported languages in code blocks
  • Examples

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.

About

Checks syntax of reStructuredText and code blocks nested within it

rstcheck.rtfd.io/

Topics

linterpythonrestructuredtextstatic-analysis

Resources

Readme
MIT license
Activity
Custom properties

Stars

259 stars

Watchers

4 watching

Forks

42 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.