Skip to content

Commit 8698127

Browse files
authored
Make sphinx fail on any warnings (python#36)
This change adds `nitpicky=True` (which is an equivalent of `-n`) to make Sphinx emit warnings for any references to non-existing targets. Then, it adds `-W` to make it fail whenever a single warning is seen. Finally, `--keep-going` allows Sphinx to print out all the warnings before exiting instead of showing just one and bailing. Resolves python#29 Refs: * https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-n * https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-W * https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-keep-going
1 parent 6c1c45b commit 8698127

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@
2424
],
2525
)
2626
}
27+
28+
# Be strict about any broken references:
29+
nitpicky = True

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extras =
1919
testing
2020
changedir = docs
2121
commands =
22-
python -m sphinx . {toxinidir}/build/html
22+
python -m sphinx -W --keep-going . {toxinidir}/build/html
2323

2424
[testenv:release]
2525
skip_install = True

0 commit comments

Comments
 (0)