Skip to content

Rename methods#7509

Merged
mernst merged 3 commits intotypetools:masterfrom
mernst:rename-methods
Feb 26, 2026
Merged

Rename methods#7509
mernst merged 3 commits intotypetools:masterfrom
mernst:rename-methods

Conversation

@mernst
Copy link
Copy Markdown
Member

@mernst mernst commented Feb 24, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

In framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java, the public helper formatJavaxToolString was renamed to messageAndFilename with the same signature and return type. Call sites now unpack the pair as (message, filename) and pass filename as the diagnostic target and message as the diagnostic text to fromPatternMatching. The helper parseCategoryString was renamed to categoryAndFixable, and fromPatternMatching now uses it to obtain the diagnostic DiagnosticKind and the fixable flag. Internal call sites were updated accordingly.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java`:
- Around line 96-98: The local variable messageAndFilename shadows the static
method messageAndFilename; rename the local variable to a clearer, distinct
identifier (e.g., resultPair, msgAndFile, or messageFilePair) in
TestDiagnosticUtils so the call to the static method
messageAndFilename(diagnosticString, noMsgText) remains obvious; update the
single declaration "IPair<String, String> messageAndFilename = ..." and any
subsequent uses (.first/.second) to use the new name.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d67d1a and e28e04d.

📒 Files selected for processing (1)
  • framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java (1)

96-98: Rename local messageAndFilename variable to avoid collision with method name.

The local variable name matches the invoked static method name, which makes the call site harder to scan.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java`
around lines 96 - 98, The local variable messageAndFilename shadows the static
method name messageAndFilename(diagnosticString, noMsgText), making the call
harder to read; rename the local (for example to resultPair or messageFilePair)
and update uses that extract message and filename (the lines referencing .first
and .second) to use the new variable name (e.g., resultPair.first and
resultPair.second) so the method call and local variable are clearly distinct;
ensure the variable type remains IPair<String,String> and update any other
references in the same scope.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In
`@framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java`:
- Around line 96-98: The local variable messageAndFilename shadows the static
method name messageAndFilename(diagnosticString, noMsgText), making the call
harder to read; rename the local (for example to resultPair or messageFilePair)
and update uses that extract message and filename (the lines referencing .first
and .second) to use the new variable name (e.g., resultPair.first and
resultPair.second) so the method call and local variable are clearly distinct;
ensure the variable type remains IPair<String,String> and update any other
references in the same scope.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e28e04d and d933cba.

📒 Files selected for processing (1)
  • framework-test/src/main/java/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java

@smillst smillst enabled auto-merge (squash) February 25, 2026 20:37
auto-merge was automatically disabled February 25, 2026 21:00

Pull Request is not mergeable

@mernst mernst merged commit 35fbc83 into typetools:master Feb 26, 2026
21 checks passed
@mernst mernst deleted the rename-methods branch February 26, 2026 04:26
@coderabbitai coderabbitai Bot mentioned this pull request Apr 10, 2026
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