--- id: doc8 version: "2.0.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # doc8 — Style checker for Sphinx (or other) RST documentation License: permissive · Maintenance: active · Downloads: 902.4K/mo ## What it is and what it does doc8 is a command-line and programmatic style checker for reStructuredText documentation. It enforces a set of opinionated formatting rules including line length limits (default 79 characters), trailing whitespace removal, proper indentation without tabs, Unix newlines, and valid RST syntax. The tool can be run directly against documentation directories or integrated into Python projects via its API. The package depends on docutils for RST parsing, restructuredtext-lint for linting checks, stevedore for plugin management, tomli for TOML configuration parsing, and Pygments for syntax highlighting. It supports configuration via command-line arguments or INI-style files (doc8.ini, setup.cfg, tox.ini, pyproject.toml) and allows selective error ignoring and path exclusion. Results are returned as structured error tuples or human-readable reports. Use it for: - Enforce consistent RST formatting in Sphinx-based documentation projects as part of CI/CD pipelines. - Validate documentation style in multi-contributor projects to catch formatting issues before merge. - Check documentation compliance in automated quality gates alongside code linting tools. - Scan existing documentation repositories for style violations and generate reports for remediation. - Programmatically validate RST files in documentation generation workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. doc8 is a style checker for reStructuredText documentation that validates formatting rules like line length, trailing whitespace, indentation, and newline conventions. Yes. doc8 is actively maintained, has no known vulnerabilities, installs with low friction, and is widely used (top 5000 PyPI packages). It fills a clear niche in RST documentation quality assurance. Install it if you maintain Sphinx or reStructuredText documentation and want automated style enforcement. ## Install pip install doc8 uv add doc8 poetry add doc8 ## Installing doc8 Before you install: Low install friction with a pure Python wheel distribution. Actively maintained with recent commits and a stable production status across Python 3.10 through 3.14. License in practice: Apache-2.0 permissive license allows use in most projects, including commercial, with minimal restrictions beyond attribution. Quickstart: pip install doc8 from doc8 import doc8 result = doc8(max_line_length=99) print(result.report()) Requires Python 3.10 or later. Verify before relying: - Whether the package handles Markdown or other markup formats beyond RST and plain text. - Performance characteristics when scanning large documentation trees. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 902.4K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rst linter, documentation style checker, restructuredtext format validation, sphinx doc linter, rst formatting rules, doc8 style checker, documentation quality tool, documentation-linting, rst-validation, ci-cd-tool [View on SkillFed](https://skillfed.io/packages/doc8) · [View on PyPI](https://pypi.org/project/doc8/)