From cf4b673725b57b9b9942bf65e7ec21b3dfb137a2 Mon Sep 17 00:00:00 2001 From: "Ed .d" Date: Wed, 8 Mar 2023 16:13:29 +0300 Subject: [PATCH 1/4] Enforce package-info.java files on /src/main/ and framework-docs module and specific packages inside spring-core module This commit updates the project's checkstyle configuration to require the existence of a package-info.java file for all packages within the src/main directory while excluding framework-docs module and certain packages inside spring-core module. A missing package-info.java will result in emitting an exception. --- src/checkstyle/checkstyle-suppressions.xml | 9 +++++++++ src/checkstyle/checkstyle.xml | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index 32019a49455f..1ab191b9d58f 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -130,4 +130,13 @@ + + + + + + + + + diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index bcf4098994fb..fc5ffd3c2bb7 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -240,4 +240,7 @@ + + + From 56a71b1c3f1f47142de761ea791d3a97fe369347 Mon Sep 17 00:00:00 2001 From: "Ed .d" Date: Wed, 8 Mar 2023 16:16:58 +0300 Subject: [PATCH 2/4] Enforce package-info.java files on /src/main/ and framework-docs module and specific packages inside spring-core module This commit updates the project's checkstyle configuration to require the existence of a package-info.java file for all packages within the src/main directory while excluding framework-docs module and certain packages inside spring-core module. A missing package-info.java will result in emitting a warning. --- src/checkstyle/checkstyle.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index fc5ffd3c2bb7..d44dafd4685d 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -242,5 +242,7 @@ - + + + From adfefcede6fd620dde912ff22bb91204f49c5f85 Mon Sep 17 00:00:00 2001 From: "Ed .d" Date: Wed, 8 Mar 2023 16:21:49 +0300 Subject: [PATCH 3/4] Enforce package-info.java files on /src/main/ and framework-docs module and specific packages inside spring-core module This commit updates the project's checkstyle configuration to require the existence of a package-info.java file for all packages within the src/main directory while excluding framework-docs module and certain packages inside spring-core module. A missing package-info.java will result in emitting a warning. Additionally, two RegexpSinglelineJava modules have been added to check that package-info.java files contain null-safety annotations @NonNullApi and NonNullFields and throws exception in case one of them or both are missing. --- src/checkstyle/checkstyle-suppressions.xml | 4 +++- src/checkstyle/checkstyle.xml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index 1ab191b9d58f..3911f004d02b 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -130,7 +130,7 @@ - + @@ -138,5 +138,7 @@ + + diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index d44dafd4685d..7e5e69431cf7 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -239,6 +239,24 @@ + + + + + + + + + + + + + + + + + + From 003e1226f8be223bbb5ca7293471bc7c54b672c9 Mon Sep 17 00:00:00 2001 From: "Ed .d" Date: Wed, 8 Mar 2023 16:24:55 +0300 Subject: [PATCH 4/4] Enforce package-info.java files on /src/main/ and framework-docs module and specific packages inside spring-core module This commit updates the project's checkstyle configuration to require the existence of a package-info.java file for all packages within the src/main directory while excluding framework-docs module and certain packages inside spring-core module. A missing package-info.java will result in emitting a warning. Additionally, two RegexpSinglelineJava modules have been added to check that package-info.java files contain null-safety annotations @NonNullApi and NonNullFields. --- src/checkstyle/checkstyle.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index 7e5e69431cf7..7dc9c48a3121 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -246,6 +246,7 @@ + @@ -254,6 +255,7 @@ +