From abb3460b9e43b374eed8095936d9120979de46e4 Mon Sep 17 00:00:00 2001 From: Nguyen Van Trung Date: Thu, 30 Nov 2017 08:27:38 +0700 Subject: [PATCH] Add doc8 to pep8 check for trove project This patch adds a doc8 check of .rst files to the current pep8 check. It includes fixes to the .rst files that didn't pass the check. Change-Id: I866ee72cfdd6067ae219a751aa7c2a0c391886f7 --- HACKING.rst | 3 ++- devstack/README.rst | 3 ++- test-requirements.txt | 1 + tox.ini | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index bceaba410d..8aa52182ed 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -4,4 +4,5 @@ Trove Library Specific Commandments - [T101] Validate that LOG messages, except debug ones, are translated - [T102] Validate that debug level logs are not translated - [T103] Exception messages should be translated -- [T104] Python 3 is not support basestring,replace basestring with six.string_types +- [T104] Python 3 is not support basestring,replace basestring with + six.string_types diff --git a/devstack/README.rst b/devstack/README.rst index a84ddfab58..c85d27f1b1 100644 --- a/devstack/README.rst +++ b/devstack/README.rst @@ -22,7 +22,8 @@ Download DevStack Enable the Trove plugin ======================= -Enable the plugin by adding the following section to ``$DEVSTACK_DIR/local.conf`` +Enable the plugin by adding the following section to +``$DEVSTACK_DIR/local.conf`` .. sourcecode:: bash diff --git a/test-requirements.txt b/test-requirements.txt index a705e0bf01..2b99ae8882 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -26,5 +26,6 @@ psycopg2>=2.6.2 # LGPL/ZPL cassandra-driver!=3.6.0,>=2.1.4 # Apache-2.0 couchdb>=0.8 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 +doc8>=0.6.0 # Apache-2.0 astroid<1.4.0 # LGPLv2.1 # breaks pylint 1.4.4 pylint==1.4.5 # GPLv2 diff --git a/tox.ini b/tox.ini index c2c9101113..35cefcfc5a 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,7 @@ sitepackages = True basepython = python2.7 commands = flake8 + doc8 {posargs} [testenv:py27] commands = {[testenv]commands} @@ -69,6 +70,9 @@ commands = [testenv:venv] commands = {posargs} +[doc8] +ignore-path = .venv,.tox,.git,dist,doc,*egg-info,tools,etc,build,*.po,*.pot,integration,releasenotes,*.txt,api-ref/source/samples + [flake8] show-source = True # H301 is ignored on purpose.