From f880f6c723cabf3eb2bf9053d4560e6c1dc6844b Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 21 Sep 2016 07:08:28 +0900 Subject: [PATCH] Turn on docs warning check in document generation Use -W (turn warnings into errors) option of sphinx-build in the commandline of 'docs' tox target so that developer can easily check sphinx warning. Also runs the same documentation check in 'pep8' tox target to detect sphinx warning in the gate. The current 'docs' job in the gate does not use 'tox -edocs' intentionally and calls build_sphinx via 'tox -evenv' [1], so sphinx warnings are not detected in the 'docs' job. Note that we no longer generate the whole code reference so this change does not increase the time of 'tox -epep8' much, while we can prevent new sphinx warnings. [1] https://github.com/openstack-infra/project-config/blob/6b50d7e3a69c49d1e035c6d026d8e3910e62a981/jenkins/scripts/run-docs.sh#L16-L19 Closes-Bug: #1411719 Closes-Bug: #1486222 Change-Id: Idc6e8a1c5762eba113b2d110d5fa223ab7406be3 --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f65566b226..46687d1399 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,7 @@ setenv = DJANGO_SETTINGS_MODULE=openstack_dashboard.test.settings commands = {[testenv:extractmessages_check]commands} + {[testenv:docs]commands} flake8 [testenv:extractmessages] @@ -136,7 +137,7 @@ commands = [testenv:docs] setenv = DJANGO_SETTINGS_MODULE=openstack_dashboard.test.settings -commands = {envpython} {toxinidir}/setup.py build_sphinx +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html