-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove tfgen warning on unexpected snippets #1837
Remove tfgen warning on unexpected snippets #1837
Conversation
Analyzing 64 instances of this warning in pulumi-aws finding that these actually render appropriate in the Registry and no action needs to be taken.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master pulumi/pulumi-hugo#1837 +/- ##
==========================================
- Coverage 60.72% 60.33% -0.40%
==========================================
Files 303 310 +7
Lines 42401 42712 +311
==========================================
+ Hits 25750 25772 +22
- Misses 15177 15468 +291
+ Partials 1474 1472 -2 ☔ View full report in Codecov by Sentry. |
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.
The warnings are unaddressable and should render correctly, so I'm happy to remove them.
pkg/tfgen/docs.go
Outdated
@@ -749,16 +749,11 @@ func (p *tfMarkdownParser) parseSection(h2Section []string) error { | |||
} | |||
|
|||
// Remove the "Open in Cloud Shell" button if any and check for the presence of code snippets. | |||
reformattedH3Section, hasExamples, isEmpty := p.reformatSubsection(h3Section) | |||
reformattedH3Section, _, isEmpty := p.reformatSubsection(h3Section) |
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.
*tfMarkdownParser.reformatSubsection
is only called here, which means its second argument is never read. Can we adjust the signature of *tfMarkdownParser.reformatSubsection
instead of ignoring the second return value?
reformattedH3Section, _, isEmpty := p.reformatSubsection(h3Section) | |
reformattedH3Section, isEmpty := p.reformatSubsection(h3Section) |
Analyzing 64 instances of this warning in pulumi-aws finding that these actually render appropriate in the Registry and
no action needs to be taken.
One example where we might need to take action is making the language chooser work, such as for the EMR Cluster resource.
pulumi/docs#11470
Spot-checking the other resources, they seem to render fine. The sections are not always called Examples, but sometimes
are called Usage etc.