-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
feat(terraform_docs
): Add support for custom markers to better support other formats than Markdown
#752
base: master
Are you sure you want to change the base?
Conversation
… other formats than markdown
895c3fe
to
c6065ae
Compare
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.
Thanks for your contribution. Please have a look into comments I added.
I'd also think of adding this as a single configuration parameter to avoid use of mix of standard and custom markers. Something like --custom-markers="// BEGIN;// END"
. This may decrease clarity and readability and separator needs a more thorough think though.
for more information, see https://pre-commit.ci
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 good. @MaxymVlasov What do you think?
terraform_docs
): Add support for custom markers to better support other formats than Markdown
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #752 +/- ##
===========================================
- Coverage 100.00% 96.38% -3.62%
===========================================
Files 9 10 +1
Lines 161 249 +88
Branches 5 7 +2
===========================================
+ Hits 161 240 +79
- Misses 0 9 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Maksym Vlasov <[email protected]>
Hmm, you probably had
|
Also, I found that formatter: asciidoc table
output:
file: README.adoc
mode: inject
template: |-
// BEGIN_TF_DOCS
{{ .Content }}
// END_TF_DOCS repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: fc53d0a10b7846fa8571ddd504660cbe5c6110d6
- id: terraform_docs
args:
- --hook-config=--add-to-existing-file=true # Boolean. true or false
#- --hook-config=--custom-marker-begin=// BEGIN_TF_DOCS
#- --hook-config=--custom-marker-end=// END_TF_DOCS When you have empty And it produces identical result as for Can you please elaborate on what exactly you tried to fix/add by this PR? |
Put an
x
into the box if that apply:Description of your changes
This adds support to pass custom markers.
This helps to improve support for other formats like asciidoc which you can use if you use a config for terraform-doc.
How can we test changes
Add your custom marker to a README and run the hook with the options. You may also want to change the template used by terraform-doc