sphinx-lint
sphinx-lint copied to clipboard
Check for stylistic and formal issues in .rst and .py files included in the documentation
An idea of @Jean-Abou-Samra, see: https://github.com/sphinx-doc/sphinx/issues/10143#issuecomment-1025134708 I like the idea: it should lead to less false positives, which is very important. It could even help spot typos in directive names!...
When I run `sphinx-lint -i .venv .tox` I was expecting `sphinx-lint` to ignore both `.venv` and `.tox` directories but it isn't the case. For it to work, I need to...
The following is valid reStructuredText/Sphinx with line-wrapped math directives inside table cells: ```rst Math in Table ============= +-----------+---------------+---------------+ | Shape | Area | Perimeter | +===========+===============+===============+ | Circle | :math:`\pi...
Python 3.8 is end-of-life next week: * https://devguide.python.org/versions/ * https://peps.python.org/pep-0569/#lifespan There's also now a regex wheel available for 3.13 so we can test 3.13 on Windows.
This is a very basic `.search` -> `.finditer` replacement. There's a *few* rules where this isn't wanted, because e.g. there's only one possible construct that could fail or because they...
CPython enabled `literal-block` in [gettext_additional_targets](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-gettext_additional_targets), so literal blocks are being extracted to translation files by the gettext builder. Since then, incorrect reports are showing up when running sphinx-lint 1.0.0, pointing...
A few other rules do this too (like `check_missing_colon_in_role`), but take unnecessary-parenthesis as an example: because unnecessary-parenthesis runs a regex that catches a single instance, it will only catch a...
For example, not detected at https://github.com/python/cpython/pull/121646 and fixed in https://github.com/python/cpython/pull/123783: ```rst .. versionadded: 3.14 ``` Should be: ```rst .. versionadded:: 3.14 ```
✅ ``` :meth:`~list.pop` ``` can be used to display `pop()`. ✅ ``` :meth:`!list.pop` ``` can be used to display `list.pop()` and avoid reference warnings. ❌ ``` :meth:`!~list.pop` ``` cannot be...
When running sphinx-lint in CI environment, I'd like to have the syntax issues to be both printed to the output and stored in a log file, because the output will...