Skip to content

Review do PR upstream #1434 - #7

Open
caioradtke wants to merge 2 commits into
masterfrom
pr-1434
Open

caioradtke wants to merge 2 commits into
masterfrom
pr-1434

Conversation

@caioradtke

@caioradtke caioradtke commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Cópia de google#1434

Summary by CodeRabbit

  • Bug Fixes
    • Wrapped triple-slash comments now retain the /// prefix on continuation lines instead of switching to //.
    • Comment wrapping respects the full comment marker when choosing a line break, avoiding breaks immediately after the prefix.
    • Long, unbreakable Markdown links remain intact when formatting comments.

arimu1 added 2 commits August 1, 2026 10:27
When wrapping line comments that start with ///, reuse that marker on
continuation lines instead of hardcoding //. Also treat the full marker
length as non-breakable so long unbreakable tokens (e.g. markdown links)
are left intact rather than splitting after the leading ///.

Fixes google#1369
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The comment wrapper now preserves triple-slash markers on continuation lines. Formatter tests cover wrapped text, unbreakable links, and updated expected output.

Changes: Line comment wrapping

Layer / File(s) Summary
Marker-preserving wrapping and tests
core/src/main/java/com/google/googlejavaformat/java/JavaCommentsHelper.java, core/src/test/java/com/google/googlejavaformat/java/FormatterTest.java, core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java
The wrapper uses the full leading marker when finding break points and preserves it on continuation lines. Tests check triple-slash comments with wrapped text and unbreakable links, and update expected formatting.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: cushon, eamonnmcmanus

Merge Risk: Minimal · up to 11e27

This change keeps the original slash marker, including triple slashes, on wrapped comment continuation lines. No actionable merge-blocking risk was identified, and the changed behavior is covered by new formatter tests.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title "Review do PR upstream #1434" is written in Portuguese and only refers to a review of an upstream pull request. It does not name the change. The changeset alters wrapLineComments in JavaComm… Replace the title with a short description of the main change, for example: "Preserve /// markers when wrapping line comments". This states the change in the author's own terms and lets a teammate identify it from history.
Passed Passed checks: 3 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Review do PR upstream #1434" is written in Portuguese and only refers to a review of an upstream pull request. It does not name the change. The changeset alters wrapLineComments in JavaCommentsHelper so that /// markers are kept on wrapped continuation lines and long unbreakable tokens such as Markdown links are not split after the marker. The title is vague and gives a teammate scanning history no information about the primary change.

Resolution

Replace the title with a short description of the main change, for example: "Preserve /// markers when wrapping line comments". This states the change in the author's own terms and lets a teammate identify it from history.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 59a7a86c-0b1f-4c28-84f3-88dd89cd0d5b
Commits

Reviewing files that changed from the base of the PR and between 35bf6ff and 11e27bc.

Files selected for processing: 3

  • core/src/main/java/com/google/googlejavaformat/java/JavaCommentsHelper.java
  • core/src/test/java/com/google/googlejavaformat/java/FormatterTest.java
  • core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants