From 589849f550ca0e9c1114de5901f53379f972826e Mon Sep 17 00:00:00 2001 From: Victor Poughon <victor.poughon@cnes.fr> Date: Tue, 11 Dec 2018 10:34:34 +0100 Subject: [PATCH] DOC: improve doc warnings --- Documentation/Cookbook/Scripts/otb_warnings.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/Cookbook/Scripts/otb_warnings.py b/Documentation/Cookbook/Scripts/otb_warnings.py index 1d1b549d4f..93bf8d0f20 100644 --- a/Documentation/Cookbook/Scripts/otb_warnings.py +++ b/Documentation/Cookbook/Scripts/otb_warnings.py @@ -1,4 +1,5 @@ import sys +import re def parameter_warnings(app_warn, app, key): @@ -17,11 +18,13 @@ def parameter_warnings(app_warn, app, key): if "." in name: warn("name contains a special character (.)") + # disabled because there are so many for now #if description == "": #warn("missing description") - if len(description) > 0 and description[-1] != ".": - warn("description does not end with a period") + # disabled because there are so many for now + #if len(description) > 0 and description[-1] != ".": + #warn("description does not end with a period") if len(description) > 0 and " :" in description: warn("description has a space before a colon") @@ -38,7 +41,7 @@ def application_documentation_warnings(app): if not longdescription[-1] == ".": warn("Application Long Description does not end with a period (.)") - if "\n " in longdescription: + if re.search("\\n [a-zA-Z]", longdescription): warn("Application Long Description contains '\\n ' pattern (usually not intended)") if " :" in longdescription: -- GitLab