forked from Archive/PX4-Autopilot
param: limit short description lenght to 150 for existing, 70 for yaml
This commit is contained in:
parent
629f7ba15b
commit
2dace0c9ea
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue