--- id: rstcheck version: "6.3.0" license: MIT license_treatment: permissive maintenance: active --- # rstcheck — Checks syntax of reStructuredText and code blocks nested within it License: permissive · Maintenance: active · Downloads: 1.0M/mo ## What it is and what it does rstcheck is a linter and static analysis tool for reStructuredText documents that validates both RST syntax and the syntax of code blocks embedded within those documents. It checks code blocks written in Python, C, C++, Bash, Doctest, JSON, XML, and reStructuredText itself, reporting errors with line numbers and severity levels. The tool is designed for documentation maintainers and developers who want to catch syntax errors in their RST files and embedded code examples before publishing. It integrates with pre-commit hooks for automated checking in CI/CD pipelines and supports optional configuration via pyproject.toml and Sphinx integration through installable extras. Use it for: - Validate syntax in code examples within Sphinx documentation before building and publishing. - Catch Python syntax errors in doctest blocks and code-block directives in RST files. - Enforce code quality in technical documentation by checking C, C++, and Bash snippets for correctness. - Integrate into pre-commit hooks to prevent RST and code-block errors from being committed. - Verify reStructuredText markup itself for structural issues like title underline mismatches. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Validates reStructuredText syntax and checks code blocks nested within RST documents for syntax errors across multiple languages including Python, C, C++, Bash, JSON, XML, and Doctest. Yes. rstcheck is actively maintained, has low install friction, carries a permissive MIT license, and solves a specific problem well: catching syntax errors in RST documents and their embedded code blocks. It's a natural fit for documentation-heavy projects and CI/CD pipelines. No known vulnerabilities. ## Install pip install rstcheck uv add rstcheck poetry add rstcheck ## Installing rstcheck Before you install: Low friction installation with a pure Python wheel. Active maintenance with a release 17 days ago and consistent CI coverage. Requires Python 3.10 or later. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and commercial contexts with minimal restrictions. Quickstart: pip install rstcheck rstcheck myfile.rst # Or with optional features: pip install rstcheck[sphinx,toml] Requires Python 3.10 or later. Verify before relying: - Whether rstcheck-core and typer dependencies introduce any notable constraints or vulnerabilities beyond the main package. - Performance characteristics when checking large documentation sets or deeply nested code blocks. - Exact behavior and coverage of the supported language checkers (C99, C++11) and whether they require external tools. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags restructuredtext linter, rst syntax checker, code block validation, rst documentation linter, static analysis rst, nested code block checker, rst quality assurance, documentation-linting, static-analysis, pre-commit-hook [View on SkillFed](https://skillfed.io/packages/rstcheck) · [View on PyPI](https://pypi.org/project/rstcheck/)