Skip to main content

Style checker for Sphinx (or other) RST documentation

Project description

Doc8 is a opinionated style checker for sphinx (or other) rst documentation.

Features

  • Ability to parse and validate rst files.

QuickStart

pip install doc8

To run doc8 just invoke it against any doc directory:

$ doc8 coolproject/docs

Usage

$ doc8  -h

usage: doc8 [-h] [--config path] [--allow-long-titles] [--ignore code]
            [--ignore-path path] [--max-line-length int] [-e extension]
            [path [path ...]]

Check documentation for simple style requirements.

What is checked:
    - invalid rst format - D000
    - lines should not be longer than 79 characters - D001
      - exception: line with no whitespace except in the beginning
      - exception: lines with http or https urls
      - exception: literal blocks
      - exception: rst target directives
    - no trailing whitespace - D002
    - no tabulation for indentation - D003
    - no carriage returns (use unix newlines) - D004

positional arguments:
  path                  path to scan for doc files (default: os.getcwd())

optional arguments:
  -h, --help            show this help message and exit
  --config path         user config file location (default: doc8.ini, tox.ini,
                        pep8.ini, setup.cfg)
  --allow-long-titles   allow long section titles (default: False)
  --ignore code         ignore the given errors code/codes
  --no-sphinx           do not ignore sphinx specific false positives
  --ignore-path path
                        ignore the given directory or file
  --max-line-length int
                        maximum allowed line length (default: 79)
  -e extension, --extension extension
                        check file extensions of the given type (default:
                        .rst, .txt)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doc8-0.3.8.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doc8-0.3.8-py2.py3-none-any.whl (12.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file doc8-0.3.8.tar.gz.

File metadata

  • Download URL: doc8-0.3.8.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for doc8-0.3.8.tar.gz
Algorithm Hash digest
SHA256 56e8b4890a9c76e2ec7f130be556d4159efdd466fc6819aac486cab05279998f
MD5 d8c6a7fc0383d347cd7922d7ee1f41f6
BLAKE2b-256 43bc58e3bb1c51d21ca6be48c15e6380e4248e272cf79cd5de3d58e0edad8b6e

See more details on using hashes here.

File details

Details for the file doc8-0.3.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for doc8-0.3.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dc23900eb3e7365c2549706584f64dacfba54a403400a0c2083a25c0df628b0e
MD5 fc8449f3ea997d977334c89d7d5b4f7b
BLAKE2b-256 c691e35a6182358ccd0118026f03fa829d555344f162a8b07831775a104e867d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page