-
Notifications
You must be signed in to change notification settings - Fork 535
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
Make main module doc generation optional when generating recursively #621
base: master
Are you sure you want to change the base?
Conversation
Meanwhile, do let me know if this PR looks reasonable to you :) |
Signed-off-by: Blake Gong <blakegong@gmail.com>
Signed-off-by: Blake Gong <blakegong@gmail.com>
@khos2ow 👋 🙏 |
I'm currently unable to run terraform-docs via pre-commit checks because of #613. It would be great if a maintainer would spare some time to review this PR. |
Hi! What is missing for this to be merged? |
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.
This looks like a very simple and low risk change. I hope a maintainer sees this and can get it merged.
@@ -42,6 +42,7 @@ terraform-docs asciidoc document [PATH] [flags] | |||
--output-values-from string inject output values from file into outputs (default "") | |||
--read-comments use comments as description when description is empty (default true) | |||
--recursive update submodules recursively (default false) | |||
--recursive-include-main include the main module (default true) (default true) |
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.
Looks like you don't need to include (default true)
in the regular description since then it gets added twice.
Started 2022, is the project still maintained? |
Any chance this PR could be merged as this is a great addition to the available functionality. |
I would really like his feature also. Will this be merged any time soon? |
Would love to see this merged, would be handy! |
Description of your changes
When using
recursive: true
,terraform-docs
currently generates the doc for./{OUTPUT_FILE}
and./modules/*/{OUTPUT_FILE}
. However, for some pure module repositories, the generation at./{OUTPUT_FILE}
might be unwanted.In #613,
skip-root-readme
was suggested as the option name. However, in my opinion, it is the best to name booleans in a non-negative manner to avoid confusion when reading the code, which meansskip
(or e.g.no-root
) should be avoided. Therefore, I went with--recursive-include-main
which defaults totrue
, to preserve existing behaviour.Closes #613.
I have:
make test
.How has this code been tested
I tried it on my own TF modules repository, which has a vpc module inside:
Notice that with
--recursive-include-main=false
,README.md updated successfully
message has disappeared, as it is no longer being generated.