Skip to content

Better way to test for constructor#7705

Merged
smillst merged 1 commit intotypetools:masterfrom
mernst:constructor-test
May 5, 2026
Merged

Better way to test for constructor#7705
smillst merged 1 commit intotypetools:masterfrom
mernst:constructor-test

Conversation

@mernst
Copy link
Copy Markdown
Member

@mernst mernst commented May 5, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 41d33690-0f27-48db-9a8f-74bf1bdb9f46

📥 Commits

Reviewing files that changed from the base of the PR and between dd4aa3e and 802759c.

📒 Files selected for processing (3)
  • checker/src/main/java/org/checkerframework/checker/initialization/InitializationTransfer.java
  • framework/src/main/java/org/checkerframework/common/wholeprograminference/WholeProgramInferenceImplementation.java
  • javacutil/src/main/java/org/checkerframework/javacutil/ElementUtils.java

📝 Walkthrough

Walkthrough

This change refactors constructor detection across three framework files. Instead of identifying constructor method invocations by comparing method names to the string "<init>", the code now uses ElementKind.CONSTRUCTOR via the getKind() method on executable elements. Two files added the necessary ElementKind import to support this updated detection logic. Additionally, Javadoc in one utility class was adjusted for line-wrapping without functional code changes. All modifications preserve existing control flow and do not alter exported public entities.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@smillst smillst merged commit 3f56b4b into typetools:master May 5, 2026
37 checks passed
@smillst smillst deleted the constructor-test branch May 5, 2026 15:55
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