-
Notifications
You must be signed in to change notification settings - Fork 706
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
Jinja macro doc fixes #10599
Jinja macro doc fixes #10599
Conversation
- WS at EOL - Only one space after :param
Try to follow style guide / common examples. Done using something like sed -Ezi ' s/(#\}\})\n+(\{\{%)/\1\n\2/g s/\n\n\n+/\n\n/g s/(:param \w+:[^\n]*\n)(-?\#\}\})/\1\n\2/g s/(:type \w+:[^\n]*\n)(-?\#\}\})/\1\n\2/g s/(\{\{%-? endmacro -?%\}\})\n+(\{\{)/\1\n\n\n\2/g ' shared/macros/*.jinja
Param must start line
Param must start line
Param must start line.
…d types, move right place
- wrong format - no arg_name argument
Hi @maage. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Code Climate has analyzed commit 1428ab1 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 52.5% (0.0% change). View more on Code Climate. |
/ok-to-test |
Thanks |
Description:
Jinja macros had several issues:
Issues not fixed here, general doc indent. Doc strings should start art beginning of the line, as any indent is visible at sphinx generated doc. Now many are intended about 4.
I did not add docs if there was none or if all
:param
was missing.I think all types should conform simple python typing format. In extension of current style guide, there should be:
list[str]
- list of stringsNone | str
- optional stringIn future this could be parsed and jinja macros could be amended with checks to ensure types match.
Rationale:
This should make reference more readable, for example:
https://complianceascode.readthedocs.io/en/latest/jinja_macros/01-general.html#
Wrong doc can cause unnecessary work or bugs.
Review Hints:
I tried to limit all changes to just doc strings.