Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
t0mk opened this issue Apr 12, 2023 · 0 comments
Open

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

t0mk opened this issue Apr 12, 2023 · 0 comments
Assignees
Labels
bug issues that report a bug

Comments

@t0mk
Copy link

t0mk commented Apr 12, 2023

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

@t0mk t0mk added the bug issues that report a bug label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues that report a bug
Projects
None yet
Development

No branches or pull requests

2 participants