Use doc8 check
doc8 is a linter for documents and used in openstack-manuals. It is better to enforce document linters for simple checking. The current rules are really simple like: - line length check (80 chars) - new line at the end of file Change-Id: I3810df521068ffc97e25a5fc56b72397bf9783bc
This commit is contained in:
parent
bbc2869767
commit
467a96190c
23
tox.ini
23
tox.ini
|
@ -17,13 +17,11 @@ deps =
|
|||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
docs: sphinx-build -W -b html doc/source doc/build/html
|
||||
horizon: {envpython} {toxinidir}/manage.py test --settings=horizon.test.settings {posargs}
|
||||
manage: {envpython} {toxinidir}/manage.py {posargs}
|
||||
py27: {[unit_tests]commands}
|
||||
py35: {[unit_tests]commands}
|
||||
openstack_dashboard: {envpython} {toxinidir}/manage.py test --settings=openstack_dashboard.test.settings {posargs}
|
||||
releasenotes: sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
runserver: {envpython} {toxinidir}/manage.py runserver {posargs}
|
||||
venv: {posargs}
|
||||
|
||||
|
@ -127,6 +125,16 @@ commands =
|
|||
pip install -U {env:TOX_EXTRA_DEPS:}
|
||||
{[unit_tests]commands}
|
||||
|
||||
[testenv:docs]
|
||||
commands =
|
||||
doc8 doc/source
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:releasenotes]
|
||||
commands =
|
||||
doc8 releasenotes/source releasenotes/notes
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[flake8]
|
||||
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
|
||||
ignore =
|
||||
|
@ -139,3 +147,14 @@ import-order-style = pep8
|
|||
|
||||
[hacking]
|
||||
local-check-factory = horizon.hacking.checks.factory
|
||||
|
||||
[doc8]
|
||||
# File extensions to check
|
||||
extensions = .rst, .yaml
|
||||
# Maximal line length should be 80 but we have some overlong lines.
|
||||
# Let's not get far more in.
|
||||
max-line-length = 80
|
||||
# Disable some doc8 checks:
|
||||
# D000: Check RST validity
|
||||
# - cannot handle "none" for code-block directive
|
||||
ignore = D000
|
||||
|
|
Loading…
Reference in New Issue