Skip to content

Commit 5f61016

Browse files
committed
Block wrong nullable/nonnull imports in checkstyle
1 parent f8162b0 commit 5f61016

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

checkstyle/checkstyle.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,15 @@
9696
<!-- Checks for imports -->
9797
<!-- See https://checkstyle.org/config_import.html -->
9898
<module name="AvoidStarImport"/>
99-
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
99+
<module name="IllegalImport"> <!-- defaults to sun.* packages -->
100+
<property name="illegalClasses" value="
101+
org.jetbrains.annotations.Nullable,
102+
org.jetbrains.annotations.NotNull,
103+
androidx.annotation.Nullable,
104+
androidx.annotation.NonNull,
105+
io.reactivex.rxjava3.annotations.NonNull,
106+
io.reactivex.rxjava3.annotations.Nullable" />
107+
</module>
100108
<module name="RedundantImport"/>
101109
<module name="UnusedImports"/>
102110

0 commit comments

Comments
 (0)