Do not treat leading underscore in plugin names as attempted deprecation.

pull/82874/head
Felix Fontein 10 months ago committed by Matt Clay
parent 8aecd1f9b2
commit 0c9f1989a7

@ -0,0 +1,2 @@
bugfixes:
- "ansible-test validate-modules sanity test - do not treat leading underscores for plugin names in collections as an attempted deprecation (https://github.com/ansible/ansible/pull/82575)."

@ -0,0 +1,22 @@
#!/usr/bin/python
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
DOCUMENTATION = '''
module: _not_deprecated
short_description: This module is not deprecated
description: Its name has a leading underscore, but it is not deprecated.
author:
- Ansible Core Team
'''
EXAMPLES = '''#'''
RETURN = ''''''
from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
module = AnsibleModule(argument_spec=dict())
module.exit_json()

@ -1099,14 +1099,6 @@ class ModuleValidator(Validator):
' documentation for removed'
)
else:
# We are testing a collection
if self.object_name.startswith('_'):
self.reporter.error(
path=self.object_path,
code='collections-no-underscore-on-deprecation',
msg='Deprecated content in collections MUST NOT start with "_", update meta/runtime.yml instead',
)
if not (doc_deprecated == routing_says_deprecated):
# DOCUMENTATION.deprecated and meta/runtime.yml disagree
self.reporter.error(

Loading…
Cancel
Save