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
  --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.5.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

doc8-0.3.5-py2.py3-none-any.whl (11.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for doc8-0.3.5.tar.gz
Algorithm Hash digest
SHA256 237afcdf252bbdedb0c80bed9dcbb1d4859fc6f57bd65dc47d46afa4118c87e7
MD5 9f0143b48b2bd84777bd1f3ff9aee637
BLAKE2b-256 678967552d657db371867a9a0ebfc8305a246c49801ab6ce43af8d395fa777c1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for doc8-0.3.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c4d36d3c79ec3cbf20888f4a61cda70019635378817dfcf7dea4d04228e57017
MD5 11796e166109c086b22ae8dd3d68cb07
BLAKE2b-256 998869a6c19a7f87c3dfdae92a406cfb0c5444802bc8cec8db462f77fa57cd28

See more details on using hashes here.

Provenance

Supported by

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