Extend `@Contract` support to handle fields
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 370
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 68
Description
In #129 we added (some) support for JetBrains @Contract annotations. We should somehow extend this support to fields, e.g., to handle the example in this comment. This will require going beyond what is expressible with standard @Contract annotations though and will likely require introducing our own annotation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing JetBrains @Contract support from issue #129 and the example in the linked NullAway issue #96 comment. Determine how field contracts should be represented beyond standard @Contract annotations, then define completion as field contracts being recognized and the example behavior being handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100