-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
Add new semantic markup support to ansible-doc text output and to validate-modules #74937
Conversation
lib/ansible/cli/doc.py
Outdated
_LINK = re.compile(r"\bL\(([^)]+), *([^)]+)\)") | ||
_URL = re.compile(r"\bU\(([^)]+)\)") | ||
_REF = re.compile(r"\bR\(([^)]+), *([^)]+)\)") | ||
_CONST = re.compile(r"\bC\(([^)]+)\)") | ||
_SEM_OPTION_NAME = re.compile(r"\bO\(([^)]+)\)") | ||
_SEM_OPTION_VALUE = re.compile(r"\bV\(([^)]+)\)") | ||
_SEM_ENV_VARIABLE = re.compile(r"\bE\(([^)]+)\)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would make these 3 into one (since they are basically same behavior)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combining C()
, V()
and E()
makes senes, while I would keep O()
differently. In the form O()
without =
in the parameter, the formatting should be bold (according to the IBM style guide), so if this is combined with your colors PR, this should be handled differently.
401370c
to
645d40f
Compare
645d40f
to
0feafc4
Compare
0feafc4
to
e6f39e7
Compare
4594f56
to
b7909d0
Compare
c862eff
to
acc0a71
Compare
acc0a71
to
14d82b2
Compare
14d82b2
to
4750866
Compare
I rebased to latest ready_for_review 🎉 |
@felixfontein Can you add some integration tests to cover this new functionality? The |
I can also split this up into two PRs - one for ansible-doc and one for validate-modules - if that helps. |
@samccann it is not waiting on us |
I created #80242 with the ansible-doc changes, and #80243 with the validate-modules changes. I can see whether I can come up with a more minimalistic validate-modules PR that at least avoids syntax errors for the new seealsos, but that doesn't check semantic markup. Would be a pitty to miss the best parts, but ... |
#80244 contains only the seealso schema change for validate-modules. That is the bare minimum of semantic markup support for validate-modules that is needed (the markup itself is not validated) so that one doesn't need to add ignore.txt entries when using this part of semantic markup. |
SUMMARY
Implements ansible-doc part of #73137.
ISSUE TYPE
COMPONENT NAME
ansible-doc