Skip to content

Review do PR upstream #1451 - #5

Open
caioradtke wants to merge 1 commit into
masterfrom
pr-1451
Open

caioradtke wants to merge 1 commit into
masterfrom
pr-1451

Conversation

@caioradtke

@caioradtke caioradtke commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Cópia de google#1451

Summary by CodeRabbit

  • Bug Fixes
    • Using --dry-run together with --replace (or their short forms) now produces a consistent error message identifying the conflicting options.

The in-place option is spelled -i/-r/-replace/--replace on the command
line; --in-place doesn't exist. The usage error for combining --dry-run
with in-place formatting named a flag users never type, which made the
message read like a bug. Point it at --replace (the long form listed in
the help text) and add a test that triggers the error through --replace
rather than only through the -i shorthand.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The dry-run and replacement-mode conflict message now names --replace. The command-line test checks this message for both --replace with --dry-run and -i with -n.

Changes: Command-line flag validation

Layer / File(s) Summary
Conflict error and flag coverage
core/src/main/java/com/google/googlejavaformat/java/Main.java, core/src/test/java/com/google/googlejavaformat/java/CommandLineFlagsTest.java
The conflict error now identifies replacement mode as --replace. The test checks the message for both long and short flag forms.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: sormuras

Merge Risk: Minimal · up to 8b450

The error shown when combining dry-run with replacement mode now names the real --replace flag. The conflict is still rejected as before, and the tests cover both the long and short flag forms. No merge-blocking risk remains.

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 #1451" is generic. It names no change. It only says the PR copies upstream PR #1451. The objectives show the real change: the dry-run error now names --replace instead… Rewrite the title to describe the change. For example: "Fix dry-run error message to reference --replace instead of --in-place". Keep the upstream reference in the description if needed.
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 #1451" is generic. It names no change. It only says the PR copies upstream PR #1451. The objectives show the real change: the dry-run error now names --replace instead of the nonexistent --in-place flag, and a test covers the --replace path. The title is vague and does not describe that change, so the check is inconclusive.

Resolution

Rewrite the title to describe the change. For example: "Fix dry-run error message to reference --replace instead of --in-place". Keep the upstream reference in the description if needed.

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: 343ab889-fd7a-4a10-804c-3fd881872439
Commits

Reviewing files that changed from the base of the PR and between 35bf6ff and 8b45072.

Files selected for processing: 2

  • core/src/main/java/com/google/googlejavaformat/java/Main.java
  • core/src/test/java/com/google/googlejavaformat/java/CommandLineFlagsTest.java

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

@caioradtke

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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