Validate EXAMPLES as YAML

This commit is contained in:
Matt Martz
2017-02-07 15:39:24 -06:00
committed by Toshio Kuratomi
parent 499d3a1b53
commit 7c00346714
112 changed files with 441 additions and 381 deletions

View File

@@ -471,6 +471,12 @@ class ModuleValidator(Validator):
if not bool(doc_info['EXAMPLES']['value']):
self.errors.append('No EXAMPLES provided')
else:
_, errors, traces = parse_yaml(doc_info['EXAMPLES']['value'],
doc_info['EXAMPLES']['lineno'],
self.name, 'EXAMPLES', load_all=True)
self.errors.extend(errors)
self.traces.extend(traces)
if not bool(doc_info['RETURN']['value']):
if self._is_new_module():