From fb8b59b5b71a3d7ba2bc4d94cd6f8d4919007ef6 Mon Sep 17 00:00:00 2001 From: Mario Corchero Date: Sat, 10 Mar 2018 11:42:29 +0000 Subject: [PATCH] DOC: Validation script checks for tabs Add a check to validate the docstrings dont have tabs at the begining of the line. --- scripts/validate_docstrings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/validate_docstrings.py b/scripts/validate_docstrings.py index 8425882f07be1..a7e121f9069fc 100755 --- a/scripts/validate_docstrings.py +++ b/scripts/validate_docstrings.py @@ -455,6 +455,12 @@ def validate_one(func_name): if not rel_desc: errs.append('Missing description for ' 'See Also "{}" reference'.format(rel_name)) + + for line in doc.raw_doc.splitlines(): + if re.match("^ *\t", line): + errs.append('Tabs found at the start of line "{}", ' + 'please use whitespace only'.format(line.lstrip())) + examples_errs = '' if not doc.examples: errs.append('No examples section found')