1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

No RETURN should be an error for new modules

This commit is contained in:
Matt Martz 2015-12-22 10:53:41 -06:00 committed by John Barker
parent 69ec1e8e6a
commit bc51bb97dd

View file

@ -400,7 +400,10 @@ class ModuleValidator(Validator):
if not bool(examples):
self.errors.append('No EXAMPLES provided')
if not bool(ret):
self.warnings.append('No RETURN provided')
if self._is_new_module():
self.errors.append('No RETURN provided')
else:
self.warnings.append('No RETURN provided')
else:
try:
yaml.safe_load(ret)