Skip to main content

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

Project description

Sphinx Lint

PyPI Monthly downloads Supported Python Version GitHub Workflow Status

Sphinx Lint is based on rstlint.py from CPython.

What is Sphinx Lint, what is it 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 positives (probably a utopia, but let's try).
  • not spend too much effort finding errors that sphinx-build already finds (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 works 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.

Releasing

One should use the download-more-tests.sh script before running tests before releasing, to avoid creating a release introducing false positives.

License

As this script was in the CPython repository the license is the Python Software Foundation Licence Version 2, see the 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.6.4.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

sphinx_lint-0.6.4-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx-lint-0.6.4.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for sphinx-lint-0.6.4.tar.gz
Algorithm Hash digest
SHA256 515748266527d5a928eb5b0b3c11b9774a97ac74735f305d0eaafe8ae2aaa205
MD5 9d8520bb556e08b789c568a3af7b4c10
BLAKE2b-256 af1afd9ed0289c9cab3fe63979f1d50a330030577e775337968ee3732d97e4d9

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: sphinx_lint-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for sphinx_lint-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b0268116c9b905202b82e84d844883c0a5eadd0f946a13f691f06f892f95c532
MD5 27792ec21ac30106179a16d3b463d29e
BLAKE2b-256 60fad1730fc5ea9da45d66071fcf2ae911863410b6c108346aad52b105611391

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