Add Mockito annotations to default excluded field annotations#1418
Conversation
WalkthroughThis pull request adds support for Mockito field annotations to NullAway's excluded field annotations set. The change adds four Mockito annotations (org.mockito.Captor, org.mockito.InjectMocks, org.mockito.Mock, org.mockito.Spy) to DEFAULT_EXCLUDED_FIELD_ANNOT in ErrorProneCLIFlagsConfig.java, ensuring that fields annotated with these markers are treated as properly initialized and excluded from null-checking. The PR includes corresponding test data annotation definitions and an integration test method to verify the behavior. Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-14T18:50:06.159ZApplied to files:
🔇 Additional comments (6)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1418 +/- ##
=========================================
Coverage 88.33% 88.33%
Complexity 2672 2672
=========================================
Files 98 98
Lines 8884 8884
Branches 1778 1778
=========================================
Hits 7848 7848
Misses 514 514
Partials 522 522 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #280
Thank you for contributing to NullAway!
Please note that once you click "Create Pull Request" you will be asked to sign our Uber Contributor License Agreement via CLA assistant.
Before pressing the "Create Pull Request" button, please provide the following:
A description about what and why you are contributing, even if it's trivial.
The issue number(s) or PR number(s) in the description if you are contributing in response to those.
If applicable, unit tests.
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.