Suppresses RLC non-final field overwrite warning for safe constructor field initialization
@iamsanjaymalakar The typecheck job is not passing.
@iamsanjaymalakar Martin asked you to assign me when you had addressed his comments. Have you addressed them?
@iamsanjaymalakar Martin asked you to assign me when you had addressed his comments. Have you addressed them?
Yes, I have. You can take a look.
@iamsanjaymalakar Please take a look at my review comments.
[!NOTE]
Other AI code review bot(s) detected
CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.
📝 Walkthrough
Walkthrough
Adds constructor-first-write suppression to MustCallConsistencyAnalyzer: introduces isFirstWriteToFieldInConstructor, callsThisConstructor, and a private ConstructorFirstWriteScanner TreeScanner; integrates these checks into checkReassignmentToOwningField to bypass certain first-field writes in constructors; extends imports for new Tree and utility APIs. Adds a per-directory test ResourceLeakFirstInitConstructorTest and a new test suite under checker/tests/resourceleak-firstinitconstructor covering constructor chaining, inline/null/instance initializers, conditionals, method-call ordering, visibility variants, final-field, and try/catch/finally scenarios. No exported or public API changes.
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 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.
Comment @coderabbitai help to get the list of available commands and usage tips.