Skip to content

Commit

Permalink
doc: fail on warning
Browse files Browse the repository at this point in the history
We want clean builds without warnings.
Enable fail on warning in the readthedocs pipeline and in local builds.
  • Loading branch information
matzf committed Oct 10, 2023
1 parent c8ba430 commit ad8fcc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ build:

sphinx:
configuration: doc/conf.py
fail_on_warning: true

python:
install:
Expand Down
5 changes: 3 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# These variables can be overridden from the command line from the environment.
SPHINXOPTS ?=
SPHINXOPTS ?= -W --keep-going # treat warnings as errors, but process all files when an error occurs
SOURCEDIR = .
BUILDDIR = _build

Expand All @@ -16,9 +16,10 @@ html latex latexpdf linkcheck help:
sphinx-build -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

# Autobuild; automatically build HTML on source changes and serve on localhost
# Note: most options are forwarded as-is to sphinx, but --keep-going is not understood and we explicitly drop it.
.PHONY: autobuild
autobuild:
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(filter-out --keep-going,$(SPHINXOPTS))

# Generate commandline docs by building the tools and running their `gendocus` subcommand
.PHONY: command-gendocs
Expand Down

0 comments on commit ad8fcc8

Please sign in to comment.