diff --git a/docs/iris/src/Makefile b/docs/iris/src/Makefile index 0aa921fd2a..2e47057a30 100644 --- a/docs/iris/src/Makefile +++ b/docs/iris/src/Makefile @@ -2,12 +2,15 @@ # # You can set these variables from the command line. -SPHINXOPTS = +SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build SRCDIR = . +# See https://www.sphinx-doc.org/en/master/man/sphinx-build.html?highlight=--keep-going#cmdoption-sphinx-build-W +WARNING_TO_ERROR = -W --keep-going + # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter @@ -39,7 +42,7 @@ clean: -rm -rf $(SRCDIR)/generated html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + $(SPHINXBUILD) $(WARNING_TO_ERROR) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html" diff --git a/docs/iris/src/developers_guide/contributing_documentation.rst b/docs/iris/src/developers_guide/contributing_documentation.rst index b64d04875c..9674289568 100644 --- a/docs/iris/src/developers_guide/contributing_documentation.rst +++ b/docs/iris/src/developers_guide/contributing_documentation.rst @@ -46,11 +46,9 @@ If you wish to run a clean build you can run:: This is useful for a final test before committing your changes. -.. note:: In addition to the automated `travis-ci`_ build of the documentation, - the https://readthedocs.org/ service is also used. The configuration - of this held in a file in the root of the - `github Iris project `_ named - ``.readthedocs.yml``. +.. note:: In order to preserve a clean build for the html, all **warnings** + have been promoted to be **errors** to ensure they are addressed. + This **only** applies when ``make html`` is run. .. _travis-ci: https://travis-ci.org/github/SciTools/iris @@ -101,8 +99,13 @@ or ignore the url. ``spelling_word_list_filename``. -.. note:: All of the above tests are automatically run as part of the - `travis-ci`_ automated build. +.. note:: In addition to the automated `travis-ci`_ build of all the + documentation build options above, the + https://readthedocs.org/ service is also used. The configuration + of this held in a file in the root of the + `github Iris project `_ named + ``.readthedocs.yml``. + .. _conf.py: https://github.com/SciTools/iris/blob/master/docs/iris/src/conf.py