mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Ensure that a deprecated module has DOCUMENTATION.deprecated (#22090)
This commit is contained in:
parent
e0975602d1
commit
f761949cca
2 changed files with 9 additions and 0 deletions
|
@ -117,6 +117,8 @@ Errors
|
||||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| 317 | option is marked as required but specifies a default. Arguments with a default should not be marked as required |
|
| 317 | option is marked as required but specifies a default. Arguments with a default should not be marked as required |
|
||||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| 318 | Module deprecated, but DOCUMENTATION.deprecated is missing |
|
||||||
|
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| **4xx** | **Syntax** |
|
| **4xx** | **Syntax** |
|
||||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
+---------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
|
|
@ -646,6 +646,13 @@ class ModuleValidator(Validator):
|
||||||
'with DOCUMENTATION.extends_documentation_fragment')
|
'with DOCUMENTATION.extends_documentation_fragment')
|
||||||
))
|
))
|
||||||
|
|
||||||
|
if self.object_name.startswith('_') and not os.path.islink(self.object_path):
|
||||||
|
if 'deprecated' not in doc or not doc.get('deprecated'):
|
||||||
|
self.errors.append((
|
||||||
|
318,
|
||||||
|
'Module deprecated, but DOCUMENTATION.deprecated is missing'
|
||||||
|
))
|
||||||
|
|
||||||
self._validate_docs_schema(doc, doc_schema, 'DOCUMENTATION', 305)
|
self._validate_docs_schema(doc, doc_schema, 'DOCUMENTATION', 305)
|
||||||
self._check_version_added(doc)
|
self._check_version_added(doc)
|
||||||
self._check_for_new_args(doc)
|
self._check_for_new_args(doc)
|
||||||
|
|
Loading…
Reference in a new issue