Look for parameters in parameter_groups

Look for used parameters in parameter_groups

This patch searches for parameter use in the parameter_groups section
as well and should eliminate some false positive warnings with
our validations.

Change-Id: I67c5ad2b6e865d454489702e5eb263a9508d26d2
This commit is contained in:
Dan Prince 2019-01-18 10:09:46 -05:00
parent 2f4176070e
commit 6fefd102bf

View File

@ -1152,8 +1152,9 @@ def validate(filename, param_map):
in_resources = str_p in str(tpl.get('resources', {}))
in_outputs = str_p in str(tpl.get('outputs', {}))
in_conditions = str_p in str(tpl.get('conditions', {}))
in_parameter_groups = str_p in str(tpl.get('parameter_groups', {}))
if (not in_resources and not in_outputs and not in_conditions
and args.quiet < 2):
and not in_parameter_groups and args.quiet < 2):
print('Warning: parameter %s in template %s '
'appears to be unused' % (p, filename))