You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by fa...@apache.org on 2024/07/03 03:21:53 UTC
(flink) 02/02: [FLINK-35733][tools] Add the Nonnull & Nullable annotations check rule.
This is an automated email from the ASF dual-hosted git repository.
fanrui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit b782acfb9c04a18d8adb8e6596bd22e0e5ebe5c3
Author: Roc Marshal <fl...@126.com>
AuthorDate: Mon Jul 1 22:53:35 2024 +0800
[FLINK-35733][tools] Add the Nonnull & Nullable annotations check rule.
---
tools/maven/checkstyle.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/maven/checkstyle.xml b/tools/maven/checkstyle.xml
index 45feb7100ba..5e017454ed1 100644
--- a/tools/maven/checkstyle.xml
+++ b/tools/maven/checkstyle.xml
@@ -229,6 +229,19 @@ This file is based on the checkstyle file of Apache Beam.
<property name="message" value="Static import functions from Guava Preconditions"/>
</module>
+ <!--
+ The Nullable & Nonnull annotations check.
+ -->
+ <module name="RegexpSinglelineJava">
+ <property name="format" value="^import org.jetbrains.annotations.Nullable;$"/>
+ <property name="message" value="Use import javax.annotation.Nullable"/>
+ </module>
+
+ <module name="RegexpSinglelineJava">
+ <property name="format" value="^import org.jetbrains.annotations.NotNull;$"/>
+ <property name="message" value="Use import javax.annotation.Nonnull"/>
+ </module>
+
<!--
JAVADOC CHECKS