-
Notifications
You must be signed in to change notification settings - Fork 58
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
fix: format proto comments in Client Overview #2280
Conversation
@@ -242,7 +242,7 @@ private static String createTableOfMethods(List<MethodAndVariants> methodAndVari | |||
.append(method.method) | |||
.append("</td>\n") | |||
.append(" <td>") | |||
.append("<p>" + method.description + "</p>") | |||
.append(CommentFormatter.formatAsJavaDocComment(method.description, null)) |
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.
Can we make the whole table a String and format with CommentFormatter
? This fix should be good for now, but in the future, someone else may add another line with dynamic content that could result in the same bug.
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 challenge with formatting the whole table with CommentFormatter
is that it replaces all of the html elements for the table with the HTML-escaped character sequence for them, so the output doesn't stay formatted as a table. You can see the example output here: cl/572240700
Can we mock this scenario with showcase? By adding the problematic comment to one of the showcase protos. |
Good idea - PR opened: googleapis/gapic-showcase#1391 |
[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed! |
[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!
|
@blakeli0 I added a failing test for JavaWriter per our offline discussion. Let me know any additional thoughts, thanks! |
Follow up PR to #2114 which breaks generation for java-bigqueryreservation due to errant formatting of the proto comments.
cl/587006892 contains the mock for bigqueryreservation's ReservationServiceClent.
I think it could make sense to add an integration test for this as the original integration tests didn't catch this bug, but I also understand that there are already a lot of integration tests. Thoughts?