diff --git a/test-requirements.txt b/test-requirements.txt index d2480e0b..c0b6170b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,6 +3,7 @@ # process, which may cause wedges in the gate later. hacking<0.11,>=0.10.0 +flake8-docstrings==0.2.1.post1 # MIT coverage>=3.6 # Apache-2.0 fixtures<2.0,>=1.3.1 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 11f55f2e..2e321e94 100644 --- a/tox.ini +++ b/tox.ini @@ -35,12 +35,21 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' commands = oslo_debug_helper {posargs} [flake8] -# NOTE(lbragstad): Even though we aren't ignoring any hacking checks, we have -# to leave it assigned in the environment specification otherwise some error -# checks will be ignored by default. If we need to ignore a specific hacking -# check in the future, we will have to remove '___' from the ignore line. -# See: http://flake8.readthedocs.org/en/latest/config.html#default -ignore = ___ +# D100: Missing docstring in public module +# D101: Missing docstring in public class +# D102: Missing docstring in public method +# D103: Missing docstring in public function +# D104: Missing docstring in public package +# D105: Missing docstring in magic method +# D200: One-line docstring should fit on one line with quotes +# D202: No blank lines allowed after function docstring +# D204: 1 blank line required after class docstring +# D209: Multi-line docstring closing quotes should be on a separate line +# D301: Use r""" if any backslashes in a docstring +# D400: First line should end with a period +# D401: First line should be in imperative mood +# H403: multi line docstrings should end on a new line +ignore = D100,D101,D102,D103,D104,D105,D200,D202,D209,D301,D204,D400,D401,H403 show-source = True exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*