Add Contract annotation to nullaway-annotations by codingkiddo · Pull Request #1569 · uber/NullAway (original) (raw)

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: 211b6f0e-fe16-4047-8bad-bf7595d58c41

📥 Commits

Reviewing files that changed from the base of the PR and between 3fd1d2e and bdfca04.

📒 Files selected for processing (1)


Walkthrough

Adds a new annotation type com.uber.nullaway.annotations.Contract with @Documented, CLASS retention, and targets METHOD and CONSTRUCTOR. The annotation exposes a required String value() element for contract clauses and includes Javadoc describing the contract-string grammar and an example. Also adds a JUnit test nullAwayContractAnnotation that configures NullAway to recognize the annotation and verifies behavior at a call site invoking a method annotated with @Contract.

Suggested reviewers

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✅ Passed checks (4 passed)

Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding a Contract annotation to the nullaway-annotations artifact.
Linked Issues check ✅ Passed The PR fulfills issue #1543 by adding an official @Contract annotation to the nullaway-annotations artifact with proper documentation and test coverage.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing the @Contract annotation and its test; no unrelated modifications are present.

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

✨ Finishing Touches 🧪 Generate unit tests (beta)

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

Built for teams:

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.