linode / linode/ansible-specdoc

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

Open
#12 0 comments 1 reaction 1 assignee View on GitHub

@zliang-akamai is already working on this.

Since Apr 11, 2024.

bug
Dominant language
Python
Stars
2
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.