Better identify deprecated configuration options

If a configuration option is tagged as deprecated in the code and the
help text does not start with DEPRECATED: add this to better identify
options that are no longer used.

If the code provides an additional deprecated reason, append this to
the provided help text of the configuration option.

Change-Id: I1a7c76c0109a6e59cc87d0ddc942c6d1cfb9dc91
This commit is contained in:
Ronald Bradford 2016-03-16 18:08:07 -04:00
parent 557d0af6d0
commit cba7f7f340
1 changed files with 6 additions and 0 deletions

View File

@ -461,6 +461,12 @@ def write_files(package_name, options, target, output_format):
option.help = "No help text available for this option."
helptext = option.help.strip().replace('\n', ' ')
helptext = ' '.join(helptext.split())
if option.deprecated_for_removal:
if not option.help.strip().startswith('DEPRECATED'):
helptext = 'DEPRECATED: ' + helptext
if option.deprecated_reason:
helptext += ' ' + option.deprecated_reason
opt_type = _TYPE_DESCRIPTIONS.get(type(option), 'Unknown')
item = (option.dest,
_sanitize_default(option),