diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 408c946f65..c685b7eb17 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -321,6 +321,10 @@ def get_plugin_info(module_dir, limit_to=None, verbose=False): if module_categories: primary_category = module_categories[0] + if not doc: + display.error("*** ERROR: DOCUMENTATION section missing for %s. ***" % module_path) + continue + if 'options' in doc and doc['options'] is None: display.error("*** ERROR: DOCUMENTATION.options must be a dictionary/hash when used. ***") pos = getattr(doc, "ansible_pos", None)