diff --git a/HACKING.rst b/HACKING.rst index 3ec8da276..81d0ff271 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -13,7 +13,7 @@ Barbican Specific Commandments - [B311] Use assertIsNone(...) instead of assertEqual(None, ...). - [B312] Use assertTrue(...) rather than assertEqual(True, ...). - [B314] str() and unicode() cannot be used on an exception. Remove or use six.text_type(). -- [B317] 'oslo_' should be used instead of 'oslo.' +- [B317] `oslo_` should be used instead of `oslo`. - [B318] Must use a dict comprehension instead of a dict constructor with a sequence of key-value pairs. - [B319] Ensure to not use xrange(). diff --git a/api-guide/source/quotas.rst b/api-guide/source/quotas.rst index db61bba38..5a3edff5f 100644 --- a/api-guide/source/quotas.rst +++ b/api-guide/source/quotas.rst @@ -48,7 +48,7 @@ project quotas are enforced for that project. Default quotas are specified in the barbican configuration file (barbican.conf). The defaults provided in the standard configuration file are as follows. -.. code-block:: none +.. code-block:: ini # default number of secrets allowed per project quota_secrets = -1 diff --git a/doc/source/api/reference/acls.rst b/doc/source/api/reference/acls.rst index b700bbd2e..ab26175df 100644 --- a/doc/source/api/reference/acls.rst +++ b/doc/source/api/reference/acls.rst @@ -195,7 +195,6 @@ list of provided users from an ACL definition, pass empty list [] for `users`. Returns an ACL reference in success case. .. note:: - PATCH API support will be changing in near future. Attributes @@ -493,7 +492,6 @@ list of provided users from an ACL definition, pass empty list [] for `users`. Returns an ACL reference in success case. .. note:: - PATCH API support will be changing in near future. Attributes diff --git a/doc/source/api/reference/orders.rst b/doc/source/api/reference/orders.rst index 579ffcb39..af02727b3 100644 --- a/doc/source/api/reference/orders.rst +++ b/doc/source/api/reference/orders.rst @@ -47,7 +47,7 @@ Request: Response: ********* -.. code-block:: none +.. code-block:: bash 200 Success @@ -181,7 +181,7 @@ Request: Response: ********* -.. code-block:: none +.. code-block:: bash 202 Created diff --git a/doc/source/api/reference/secrets.rst b/doc/source/api/reference/secrets.rst index 47332b24f..d3fe08d4e 100644 --- a/doc/source/api/reference/secrets.rst +++ b/doc/source/api/reference/secrets.rst @@ -62,7 +62,7 @@ be prefixed with any of these comparison operators: ``gt:`` (greater-than), For example, to get a list of secrets that will expire in January of 2020: -.. code-block:: none +.. code-block:: ini GET /v1/secrets?expiration=gte:2020-01-01T00:00:00,lt:2020-02-01T00:00:00 @@ -79,7 +79,7 @@ use ``:asc`` for every key that does not include a direction. For example, to sort the list from most recently created to oldest: -.. code-block:: none +.. code-block:: ini GET /v1/secrets?sort=created:desc diff --git a/lower-constraints.txt b/lower-constraints.txt index e8b23a5a7..51a568a2b 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -24,6 +24,7 @@ docutils==0.14 dogpile.cache==0.6.5 dogtag-pki==10.3.5.1 dulwich==0.19.0 +doc8==0.6.0 enum-compat==0.0.2 enum34==1.1.6 eventlet==0.18.2 diff --git a/test-requirements.txt b/test-requirements.txt index 301d52d06..c98bcb361 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -20,3 +20,6 @@ tempest>=17.1.0 # Apache-2.0 # Bandit build requirements bandit>=1.1.0 # Apache-2.0 + +doc8>=0.6.0 # Apache-2.0 +Pygments>=2.2.0 # BSD license diff --git a/tox.ini b/tox.ini index 4a1b02049..485d218f3 100644 --- a/tox.ini +++ b/tox.ini @@ -46,6 +46,7 @@ commands = basepython = python3 sitepackages = False commands = + doc8 {posargs} flake8 {posargs} # Run security linter bandit -r barbican -x tests -n5 @@ -141,6 +142,10 @@ commands = coverage html -d cover coverage xml -o cover/coverage.xml +[doc8] +ignore = D001 +ignore-path = .venv,.git,.tox,.tmp,*barbican/locale*,*lib/python*,barbican.egg*,doc/build,releasenotes/*,doc/source/contributor/api + [flake8] filename = *.py,app.wsgi exclude = .git,.idea,.tox,bin,dist,debian,rpmbuild,tools,*.egg-info,*.eggs,contrib,