Add optional spell checker target
Add a tox target using sphinxcontrib-spelling to let authors run a spell checker against documents before submitting them. Change-Id: If519fb63bc4b0923a48df9e0435125fd66ab5c0c
This commit is contained in:
parent
2cb8d8b486
commit
78397ebea2
|
@ -26,6 +26,14 @@ extensions = [
|
|||
'oslosphinx'
|
||||
]
|
||||
|
||||
# Optionally allow the use of sphinxcontrib.spelling to verify the
|
||||
# spelling of the documents.
|
||||
try:
|
||||
import sphinxcontrib.spelling
|
||||
extensions.append('sphinxcontrib.spelling')
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
# text edit cycles.
|
||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||
|
|
|
@ -11,9 +11,15 @@ setenv =
|
|||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:spelling]
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
sphinxcontrib-spelling
|
||||
PyEnchant
|
||||
commands = sphinx-build -b spelling doc/source doc/build/spelling
|
||||
|
|
Loading…
Reference in New Issue