{"id":19931242,"url":"https://github.com/sphinx-contrib/sphinx-lint","last_synced_at":"2025-10-24T22:15:10.606Z","repository":{"id":37036744,"uuid":"451150637","full_name":"sphinx-contrib/sphinx-lint","owner":"sphinx-contrib","description":"Check for stylistic and formal issues in .rst and .py files included in the documentation","archived":false,"fork":false,"pushed_at":"2024-03-23T12:03:32.000Z","size":286,"stargazers_count":61,"open_issues_count":31,"forks_count":17,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-05-01T18:33:56.773Z","etag":null,"topics":["docs","documentation","lint","linter","python","restructuredtext","rst","sphinx"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/sphinx-lint/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sphinx-contrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["JulienPalard"],"liberapay":"JulienPalard"}},"created_at":"2022-01-23T15:44:47.000Z","updated_at":"2024-04-05T13:44:19.000Z","dependencies_parsed_at":"2023-10-16T03:19:14.126Z","dependency_job_id":"f7686b96-f6cf-4a09-b439-a0ef271db6b1","html_url":"https://github.com/sphinx-contrib/sphinx-lint","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sphinx-contrib%2Fsphinx-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sphinx-contrib%2Fsphinx-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sphinx-contrib%2Fsphinx-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sphinx-contrib%2Fsphinx-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sphinx-contrib","download_url":"https://codeload.github.com/sphinx-contrib/sphinx-lint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docs","documentation","lint","linter","python","restructuredtext","rst","sphinx"],"created_at":"2024-11-12T23:06:34.736Z","updated_at":"2025-10-24T22:15:10.543Z","avatar_url":"https://github.com/sphinx-contrib.png","language":"Python","funding_links":["https://github.com/sponsors/JulienPalard","https://liberapay.com/JulienPalard"],"categories":[],"sub_categories":[],"readme":"# Sphinx Lint\n\n[![PyPI](https://img.shields.io/pypi/v/sphinx-lint)\n ![Monthly downloads](https://img.shields.io/pypi/dm/sphinx-lint)\n ![Supported Python Version](https://img.shields.io/pypi/pyversions/sphinx-lint.svg)\n](https://pypi.org/project/sphinx-lint)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sphinx-contrib/sphinx-lint/tests.yml?branch=main)](https://github.com/sphinx-contrib/sphinx-lint/actions)\n\nSphinx Lint is based on [rstlint.py from\nCPython](https://github.com/python/cpython/blob/e0433c1e7/Doc/tools/rstlint.py).\n\n\n## What is Sphinx Lint, what is it not?\n\nSphinx Lint should:\n\n- be reasonably fast so it's comfortable to use as a linter in your editor.\n- be usable on a single file.\n- not give any false positives (probably a utopia, but let's try).\n- not spend too much effort finding errors that sphinx-build already finds (or can easily find).\n- focus on finding errors that are **not** visible to sphinx-build.\n\n\n## Using Sphinx Lint\n\nHere are some example invocations of Sphinx Lint from the command line:\n\n```sh\nsphinx-lint           # check all dirs and files\nsphinx-lint file.rst  # check a single file\nsphinx-lint docs      # check a directory\nsphinx-lint -i venv   # ignore a file/directory\nsphinx-lint -h        # for more options\n```\n\nSphinx Lint can also be used via [pre-commit](https://pre-commit.com).\nWe recommend using a configuration like this:\n\n```yaml\n  - repo: https://github.com/sphinx-contrib/sphinx-lint\n    rev: LATEST_SPHINXLINT_RELEASE_TAG\n    hooks:\n      - id: sphinx-lint\n```\n\n\n## Known issues\n\nCurrently Sphinx Lint can't work with tables, there's no understanding\nof how `linesplit` works in tables, like:\n\n```rst\n   +-----------------------------------------+-----------------------------+---------------+\n   | Method                                  | Checks that                 | New in        |\n   +=========================================+=============================+===============+\n   | :meth:`assertEqual(a, b)                | ``a == b``                  |               |\n   | \u003cTestCase.assertEqual\u003e`                 |                             |               |\n   +-----------------------------------------+-----------------------------+---------------+\n```\n\nas Sphinx Lint works line by line it will inevitably think the `:meth:` role is not closed properly.\n\nTo avoid false positives, some rules are skipped if we're in a table.\n\n\n## Contributing\n\nA quick way to test if some syntax is valid from a pure\nreStructuredText point of view, one case use `docutils`'s `pseudoxml`\nwriter, like:\n\n```text\n$ docutils --writer=pseudoxml tests/fixtures/xpass/role-in-code-sample.rst\n\u003cdocument source=\"tests/fixtures/xpass/role-in-code-sample.rst\"\u003e\n    \u003cparagraph\u003e\n        Found in the pandas documentation, this is valid:\n    \u003cbullet_list bullet=\"*\"\u003e\n        \u003clist_item\u003e\n            \u003cparagraph\u003e\n                A pandas class (in the form\n                \u003cliteral\u003e\n                    :class:`pandas.Series`\n                )\n        \u003clist_item\u003e\n            \u003cparagraph\u003e\n                A pandas method (in the form\n                \u003cliteral\u003e\n                    :meth:`pandas.Series.sum`\n                )\n        \u003clist_item\u003e\n            \u003cparagraph\u003e\n                A pandas function (in the form\n                \u003cliteral\u003e\n                    :func:`pandas.to_datetime`\n                )\n    \u003cparagraph\u003e\n        it's documenting roles using code samples (double backticks).\n```\n\n\n## Releasing\n\n1. Make sure that the [CI tests pass](https://github.com/sphinx-contrib/sphinx-lint/actions)\n   and optionally double-check locally with \"friends projects\" by running:\n\n       sh download-more-tests.sh\n       python -m pytest\n2. Go on the [Releases page](https://github.com/sphinx-contrib/sphinx-lint/releases)\n3. Click \"Draft a new release\"\n4. Click \"Choose a tag\"\n5. Type the next vX.Y.Z version and select \"Create new tag: vX.Y.Z on publish\"\n6. Leave the \"Release title\" blank (it will be autofilled)\n7. Click \"Generate release notes\" and amend as required\n8. Click \"Publish release\"\n9. Check the tagged\n   [GitHub Actions build](https://github.com/sphinx-contrib/sphinx-lint/actions/workflows/deploy.yml)\n   has [deployed to PyPI](https://pypi.org/project/sphinx-lint/#history)\n\n\n## License\n\nAs this script was in the CPython repository the license is the Python\nSoftware Foundation Licence Version 2, see the LICENSE file for a full\nversion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsphinx-contrib%2Fsphinx-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsphinx-contrib%2Fsphinx-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsphinx-contrib%2Fsphinx-lint/lists"}