feat: simplify args inputs for terraform_docs#155
feat: simplify args inputs for terraform_docs#1551oglop1 wants to merge 1 commit intoantonbabenko:masterfrom
terraform_docs#155Conversation
|
@antonbabenko Take this as an initial proposal, there is some additional cleanup required but I'll put more effort after discussion. But I think that ideal solution which could resolve more issues regarding the version would be to discard bash and write some Go code with the same functionality and PR it to the original repository, however, that might be more work. |
|
nudge @antonbabenko could you please provide your opinion on this? PR received a few reactions from which I assume it's a wanted feature by more people. Thank you. |
|
Hi @1oglop1 ! There is simply not enough time for me to review all the projects I am involved in. I assigned @robinbowes to take a look if he has some time. |
|
@robinbowes Any update on your review? |
|
@Vlaaaaaaad I noticed you liked my PR, and since @antonbabenko takes preference on issues/PRs from sponsors it may help if you participate in the discussion to give @antonbabenko incentive to look and comment on this change |
|
Can this be merged? Out of the box terraform-docs does not work right now unless we downgrade terraform-docs. And to make it worse homebrew does not have older versions available. |
What doesn't work? It's working for me. |
How is your terraform code structured? Mine is in a sub-folder. Please see the issue #181. Actually this PR will not help with my issue since the path is hardcoded in |
| if [[ "$terraform_docs_awk_file" == "0" ]]; then | ||
| # shellcheck disable=SC2086 | ||
| terraform-docs md $args ./ > "$tmp_file" | ||
| terraform-docs $args ./ > "$tmp_file" |
There was a problem hiding this comment.
To provide backward compatibility shouldn't $args have md default somewhere?
|
I also noticed I can't pass args to the terraform-docs hook. here's my config: |
| argv=($@) | ||
|
|
||
| for arg in ${argv[@]}; do | ||
| echo WORKING with: \"$arg\" |
There was a problem hiding this comment.
We should also hide this print or should echo when verbose is enabled.
terraform_docs
|
Too outdated |
This should fix #154.
I removed
getoptand instead simply passed args array in the same order as specified via.pre-commit-config.yamlfile.example usage: