Skip to content

Commit d2d87cd

Browse files
committed
Add JSpecify prompt
1 parent 0846c55 commit d2d87cd

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
I have already asked IntelliJ to infer nullity on this class. Can you help me make this more accurate.
2+
3+
Note that JSpecify is already used in this repository so it's already imported.
4+
5+
Analyze this Java class and add JSpecify annotations based on:
6+
1. Set the class to be `@NullMarked`
7+
2. Remove all the redundant `@NonNull` annotations that IntelliJ added
8+
3. Check Javadoc @param tags mentioning "null", "nullable", "may be null"
9+
4. Check Javadoc @return tags mentioning "null", "optional", "if available"
10+
5. GraphQL specification semantics (nullable fields, non-null by default)
11+
6. Method implementations that return null or check for null
12+
13+
IntelliJ's infer nullity code analysis isn't comprehensive so feel free to make corrections.
14+
15+
Finally, please check all of this works, by running the NullAway compile check.

0 commit comments

Comments
 (0)