From 3dbc21f47ed2fe07dce09770e02e692e1c0e3045 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 21 Aug 2021 15:37:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Make=20Sphinx=20strict=20about?= =?UTF-8?q?=20broken=20references=20(#2168)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .readthedocs.yml | 1 + docs/changelog.rst | 2 +- docs/changelog/2168.misc.rst | 1 + docs/conf.py | 5 +++++ docs/example/basic.rst | 2 +- docs/index.rst | 2 +- tox.ini | 2 +- 7 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 docs/changelog/2168.misc.rst diff --git a/.readthedocs.yml b/.readthedocs.yml index 5331dbd20..d46202651 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,3 +15,4 @@ python: sphinx: builder: html configuration: docs/conf.py + fail_on_warning: true diff --git a/docs/changelog.rst b/docs/changelog.rst index e130fc803..7b4bf2d6d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -72,7 +72,7 @@ Bugfixes ^^^^^^^^ - Distinguish between normal Windows Python and MSYS2 Python when looking for - virtualenv executable path. Adds os.sep to :class:`InterpreterInfo` + virtualenv executable path. Adds os.sep to :class:`~tox.interpreters.InterpreterInfo` - by :user:`jschwartzentruber` `#1982 `_ - Fix a ``tox-conda`` isolation build bug - by :user:`AntoineD`. diff --git a/docs/changelog/2168.misc.rst b/docs/changelog/2168.misc.rst new file mode 100644 index 000000000..1cc7fe17f --- /dev/null +++ b/docs/changelog/2168.misc.rst @@ -0,0 +1 @@ +Started enforcing valid references in Sphinx docs -- :user:`webknjaz` diff --git a/docs/conf.py b/docs/conf.py index 05f101706..6261d6aa5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -129,3 +129,8 @@ def parse_node(env, text, node): "pull": ("https://github.com/tox-dev/tox/pull/%s", "p"), "user": ("https://github.com/%s", "@"), } + +nitpicky = True +nitpick_ignore = [ + ("py:class", "tox.interpreters.InterpreterInfo"), +] diff --git a/docs/example/basic.rst b/docs/example/basic.rst index e37875288..0734b904b 100644 --- a/docs/example/basic.rst +++ b/docs/example/basic.rst @@ -212,7 +212,7 @@ Further customizing installation By default tox uses `pip`_ to install packages, both the package-under-test and any dependencies you specify in ``tox.ini``. You can fully customize tox's install-command through the -testenv-specific :conf:`install_command=ARGV` setting. +testenv-specific :conf:`install_command = ARGV ` setting. For instance, to use pip's ``--find-links`` and ``--no-index`` options to specify an alternative source for your dependencies: diff --git a/docs/index.rst b/docs/index.rst index 908a8a31e..e101336ba 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -137,7 +137,7 @@ Current features * :doc:`plugin system ` to modify tox execution with simple hooks. * uses pip_ and setuptools_ by default. Support for configuring the installer command - through :conf:`install_command=ARGV`. + through :conf:`install_command = ARGV `. * **cross-Python compatible**: CPython-2.7, 3.5 and higher, Jython and pypy_. diff --git a/tox.ini b/tox.ini index f777dd539..bdf06705a 100644 --- a/tox.ini +++ b/tox.ini @@ -50,7 +50,7 @@ deps = description = invoke sphinx-build to build the HTML docs basepython = python3.8 extras = docs -commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -W -bhtml {posargs} +commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -W --keep-going -n -bhtml {posargs} python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))' [testenv:package_description]