From a16eb90cc0c4ecf5788040308c7eee8d301d5c74 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Thu, 14 May 2020 15:53:55 -0500 Subject: [PATCH] Add doc linting to pep8 target This adds doc8 linting to validate our docs. Fixes minor issues with our HACKING doc that this found. Change-Id: I1d9277f11e2017fb15e6286d15c4cb70727ef12d Signed-off-by: Sean McGinnis --- HACKING.rst | 2 +- lower-constraints.txt | 1 + test-requirements.txt | 1 + tox.ini | 8 +++++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index 775c712..33283e5 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -1,4 +1,4 @@ brick-python-cinderclient-ext Style Commandments -=============================================== +================================================ Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ diff --git a/lower-constraints.txt b/lower-constraints.txt index 1c09873..5b0919c 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -9,6 +9,7 @@ cmd2==0.8.1 coverage==4.0 ddt==1.0.1 debtcollector==1.19.0 +doc8==0.6.0 docutils==0.14 dulwich==0.19.0 enum-compat==0.0.2 diff --git a/test-requirements.txt b/test-requirements.txt index d1fa5b4..0b7e85d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,3 +11,4 @@ oslotest>=3.2.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT stestr>=1.0.0 # Apache-2.0 +doc8>=0.6.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 2347ed0..345ca65 100644 --- a/tox.ini +++ b/tox.ini @@ -29,7 +29,9 @@ commands = whitelist_externals = find [testenv:pep8] -commands = flake8 {posargs} +commands = + flake8 {posargs} + doc8 [testenv:fast8] envdir = {toxworkdir}/pep8 @@ -94,6 +96,10 @@ show-source = True builtins = _ exclude=.venv,.git,.tox,dist,doc/*,*lib/python*,*egg,build +[doc8] +ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/*/EGG-INFO/*.txt,doc/so urce/configuration/tables,./*.txt,releasenotes/build +extension=.txt,.rst,.inc + [testenv:lower-constraints] deps = -c{toxinidir}/lower-constraints.txt