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

Uploaded Source

Built Distribution

sphinx_lint-0.5-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx-lint-0.5.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for sphinx-lint-0.5.tar.gz
Algorithm Hash digest
SHA256 a4267b909714de73329c835a4599d7fc0e658ba7febf4644fb6b427dbfc5a546
MD5 a2259979dc8ed5cf4fcd87e866fb63f5
BLAKE2b-256 8e34120e485a683dbfbc58ccf288bbf4d3868bb4d72c92bd920105e1d878fd2b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: sphinx_lint-0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for sphinx_lint-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ddac1a6045a9a8c87e4fa0674c977672800fc944f0cbbf9fa61f683d1bc22b57
MD5 603085a8ef1ba4bb09f507431381af9a
BLAKE2b-256 356c1baefc1c4a49fd435c86ad62d47f8279b4ef3df145e99e71bb6bbee80615

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