mirror of
https://github.com/ansible/ansible.git
synced 2026-08-05 16:13:06 +02:00
better error message for malformed documentation (#84705)
No the file name that caused the error will be apparent --------- Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com> Co-authored-by: Abhijeet Kasurde <Akasurde@redhat.com>
This commit is contained in:
co-authored by
Abhijeet Kasurde
parent
cc30f25c42
commit
55e9e21ded
@@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2022 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = """
|
||||
name: broken_docs
|
||||
-
|
||||
"""
|
||||
|
||||
EXAMPLE = """
|
||||
"""
|
||||
|
||||
RETURN = """
|
||||
"""
|
||||
@@ -181,3 +181,13 @@
|
||||
- '"[DEPRECATION WARNING]" in result.stderr'
|
||||
- '"deprecated_with_adj_docs " in result.stdout'
|
||||
- '"AUTHOR: Ansible Core Team" in result.stdout'
|
||||
|
||||
- name: Handle plugin docs
|
||||
debug:
|
||||
msg: "{{ lookup('broken_docs') }}"
|
||||
register: r
|
||||
ignore_errors: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "'plugin broken_docs has malformed documentation' in r.msg"
|
||||
|
||||
Reference in New Issue
Block a user