-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
Updates the formatting of Ruby comments to expect comments in the format of [CommonMark](https://commonmark.org/). Proto comments generally follow the CommonMark spec. Replaces ad hoc comment transformations with a visitor for the Markdown elements. Adds tests for the RubyCommentReformatter. Cleans up comment regex patterns. Updates googleapis#722
seems good to me, but I completely lack contextual knowledge about commonmark edit: want to look into the CI failures? |
maybe the failures are DIRT related? |
Codecov Report
@@ Coverage Diff @@
## master #2562 +/- ##
============================================
+ Coverage 86.54% 87.08% +0.54%
- Complexity 5464 5508 +44
============================================
Files 465 465
Lines 21768 21847 +79
Branches 2391 2393 +2
============================================
+ Hits 18839 19026 +187
+ Misses 2086 1950 -136
- Partials 843 871 +28
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #2562 +/- ##
============================================
+ Coverage 86.54% 87.08% +0.54%
- Complexity 5465 5508 +43
============================================
Files 465 465
Lines 21767 21847 +80
Branches 2391 2393 +2
============================================
+ Hits 18838 19026 +188
+ Misses 2087 1950 -137
- Partials 842 871 +29
Continue to review full report at Codecov.
|
@landrito PTAL |
@eoogbe what's the reason for this change? The baseline changes don't look too significant but I'm worried that this could break existing synth scripts for the Ruby libraries. |
It ensures the Ruby comments consistently follow CommonMark, which the form of markdown proto comments use. The main reason for the change is to make the CommentReformatter more testable. See #722 |
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.
It looks like this changes the output, particularly with how whitespace is handled. I'm concerned that this is going to create churn in our existing libraries. The extra tests are nice but I'm not sure it's worth it given that we'll be moving to micro-generators soon, unless we don't need to change the existing behavior.
// Might as well create only one. Parser is thread-safe. | ||
private static final Parser PARSER = Parser.builder().build(); | ||
|
||
private static String CLOUD_URL_PREFIX = "https://cloud.google.com"; |
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.
Is this duplicated now?
# can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( | ||
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- | ||
# ) to obtain a formatter capable of generating timestamps in this format. | ||
# can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) to obtain a formatter capable of generating timestamps in this format. |
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.
Why is this changing?
@@ -1991,7 +1984,9 @@ module Google | |||
# | |||
# * Here is a sentence about the first element of the list that continues | |||
# into a second line. | |||
# |
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.
Why are these newlines being added?
@jbolinger If it's the case that we don't want to fix the comment formatting, then we should probably close the issue. |
Updates the formatting of Ruby comments to expect comments in the format
of CommonMark. Proto comments generally
follow the CommonMark spec.
Replaces ad hoc comment transformations with a visitor for the Markdown
elements. Adds tests for the RubyCommentReformatter.
Cleans up comment regex patterns.
Updates #722