Skip to main content

Check for stylistic and formal issues in .rst and .py files included in the documentation.

Project description

Sphinx Lint

Sphinx Lint is based on rstlint.py from cpython.

What sphinx-lint is, what it is not?

sphinx-lint should:

  • be reasonably fast so it's comfortable to use as a linter in your editor.
  • be usable on a single file.
  • not give any false positive (probably an utopy, but let's try).
  • not spend too much efforts finding errors that sphinx-build already find (or can easily find).
  • focus on finding errors that are not visible to sphinx-build.

Known issues

Currently sphinx-lint can't work with tables, there's no understanding of how linesplit work in tables, like:

   +-----------------------------------------+-----------------------------+---------------+
   | Method                                  | Checks that                 | New in        |
   +=========================================+=============================+===============+
   | :meth:`assertEqual(a, b)                | ``a == b``                  |               |
   | <TestCase.assertEqual>`                 |                             |               |
   +-----------------------------------------+-----------------------------+---------------+

as sphinx-lint works line by line it will inevitably think the :meth: role is not closed properly.

To avoid false positives, some rules are skipped if we're in a table.

License

As this script was in the cpython repository the license is the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2, see LICENSE file for a full version.

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

sphinx-lint-0.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

sphinx_lint-0.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file sphinx-lint-0.2.tar.gz.

File metadata

  • Download URL: sphinx-lint-0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.12

File hashes

Hashes for sphinx-lint-0.2.tar.gz
Algorithm Hash digest
SHA256 c24aae51735bbcc2738d671095f3d84be3fe22c1b925b74031ce627776a8bd23
MD5 d7adca7c23482c3709f0f906846d8698
BLAKE2b-256 f482f11168bab07e2d69ac8252750e59b4b45e7885e7169e2f97d4e3cf55bca9

See more details on using hashes here.

Provenance

File details

Details for the file sphinx_lint-0.2-py3-none-any.whl.

File metadata

  • Download URL: sphinx_lint-0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.12

File hashes

Hashes for sphinx_lint-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3875b497a6583a1f39036c613be430667414fda35bdf2c029d7449fc3ab37070
MD5 6e4adf06f42d4fca7c202772e43851ab
BLAKE2b-256 cf01cc01a7a13c357addfb849b82378edd0347ec889083399b5930160d803dba

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