linode / ansible-specdoc

A utility for dynamically generating Ansible Collection documentation.
Apache License 2.0
2 stars 5 forks source link

[Bug]: Misleading error on "-c" (when clearing injected docs) #12

Open t0mk opened 1 year ago

t0mk commented 1 year ago

Expected Behavior

When I want to clear DOCUMENTATION, EXAMPLES and RETURN injected docs in a python script, I would use -c and call

$ ansible-specdoc -c -i plugins/modules/metal_project.py   

.. output of that is error:

usage: ansible-specdoc [-h] [-s] [-n MODULE_NAME] [-i INPUT_FILE] [-o OUTPUT_FILE]
                       [-f {yaml,json,jinja2}] [-j] [-t TEMPLATE_FILE]
                       [-c [CLEAR_INJECTED_FIELDS]]
ansible-specdoc: error: Invalid format specified.

It complains about format, but what actually needs to happen is

$ ansible-specdoc -jc -i plugins/modules/metal_project.py   

The error is a bit misleading, it would be good if it was clearer that "-c" must be passed with "-j"

Actual Behavior

No response

Steps to Reproduce

No response

Error Output

No response