diff --git a/src/lib/parameters/px4params/srcparser.py b/src/lib/parameters/px4params/srcparser.py index b601b90b23..7fadf9f7c3 100644 --- a/src/lib/parameters/px4params/srcparser.py +++ b/src/lib/parameters/px4params/srcparser.py @@ -307,6 +307,8 @@ class SourceParser(object): if short_desc is not None: if '\n' in short_desc: raise Exception('short description must be a single line (parameter: {:})'.format(name)) + if len(short_desc) > 150: + raise Exception('short description too long (150 max, is {:}, parameter: {:})'.format(len(short_desc), name)) param.SetField("short_desc", self.re_remove_dots.sub('', short_desc)) if long_desc is not None: long_desc = self.re_remove_carriage_return.sub(' ', long_desc) diff --git a/validation/module_schema.yaml b/validation/module_schema.yaml index cf954e401a..591af3853c 100644 --- a/validation/module_schema.yaml +++ b/validation/module_schema.yaml @@ -111,6 +111,8 @@ parameters: # Short description (one line) type: string required: true + maxlength: 70 + regex: '[^\n]+' long: # Long description (can be multiple lines) type: string