Merge "Default warning-is-error to True for non-legacy Sphinx projects"
This commit is contained in:
commit
9050a21a1f
@ -19,8 +19,10 @@ Run sphinx to generate documentation
|
||||
|
||||
.. zuul:rolevar:: sphinx_warning_is_error
|
||||
|
||||
Whether to treat sphinx build warnings as errors. Defaults to undefined
|
||||
which means to attempt to find the setting in a setup.cfg file.
|
||||
Whether to treat sphinx build warnings as errors. Defaults to the value of
|
||||
``[build_sphinx] warning-is-error`` in ``setup.cfg`` if defined, ``False``
|
||||
if the ``[build_sphinx]`` section is present but the ``warning-is-error``
|
||||
option is undefined, or ``True`` if the entire section is undefined.
|
||||
|
||||
.. zuul:rolevar:: zuul_work_virtualenv
|
||||
:default: ~/.venv
|
||||
|
@ -68,7 +68,7 @@ def main():
|
||||
)
|
||||
project_dir = module.params['project_dir']
|
||||
|
||||
warning_is_error = False
|
||||
warning_is_error = True
|
||||
# TODO(mordred) Remove autodoc_index_modules logic when we get OpenStack
|
||||
# projects off of the pbr autoindex
|
||||
autodoc_index_modules = False
|
||||
@ -91,9 +91,11 @@ def main():
|
||||
autodoc_index_modules=autodoc_index_modules,
|
||||
msg="Error reading setup.cfg, defaulting flags to false")
|
||||
|
||||
if (c.has_section('build_sphinx') and
|
||||
c.has_option('build_sphinx', 'warning-is-error')):
|
||||
warning_is_error = c.getboolean('build_sphinx', 'warning-is-error')
|
||||
if c.has_section('build_sphinx'):
|
||||
if c.has_option('build_sphinx', 'warning-is-error'):
|
||||
warning_is_error = c.getboolean('build_sphinx', 'warning-is-error')
|
||||
else:
|
||||
warning_is_error = False
|
||||
if c.has_section('pbr') and c.has_option('pbr', 'autodoc_index_modules'):
|
||||
autodoc_index_modules = c.getboolean('pbr', 'autodoc_index_modules')
|
||||
if (c.has_section('pbr') and
|
||||
|
Loading…
Reference in New Issue
Block a user