This is an automated email from the ASF dual-hosted git repository.

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new c8ef361ac2c Move JUnit Javadoc exemptions to Checkstyle (#39714)
c8ef361ac2c is described below

commit c8ef361ac2c36e8b92fdfa1a09da53d973c082d5
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Sep 3 19:27:11 2026 +0800

    Move JUnit Javadoc exemptions to Checkstyle (#39714)
---
 CODE_OF_CONDUCT.md                                 | 1 -
 docs/community/content/involved/conduct/code.cn.md | 1 -
 docs/community/content/involved/conduct/code.en.md | 1 -
 src/resources/checkstyle.xml                       | 3 ++-
 4 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 23bbb391066..ae361b91c77 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -109,7 +109,6 @@ The following code of conduct is based on full compliance 
with the [Apache Softw
    - Reference non-identity assertions must use `assertThat(actual, 
not(sameInstance(expected)))`;
    - Use Hamcrest matchers like `is()`, `not()` for precise and readable 
assertions.
 - The actual values in test cases should be named actual XXX, and expected 
values should be named expected XXX.
-- Test classes and methods marked with `@Test` do not need JAVADOC.
 - Using `mock` should follow the following specifications:
    - Mock databases, caches, registries, network calls, time, and other heavy 
external dependencies instead of connecting to external environments.
    - Mock objects with more than two levels of nesting when they are unrelated 
to the behavior under test; do not construct deep unrelated object graphs.
diff --git a/docs/community/content/involved/conduct/code.cn.md 
b/docs/community/content/involved/conduct/code.cn.md
index d4231e0a082..cdab27814a0 100644
--- a/docs/community/content/involved/conduct/code.cn.md
+++ b/docs/community/content/involved/conduct/code.cn.md
@@ -114,7 +114,6 @@ chapter = true
     - 引用非同一性断言必须使用 `assertThat(actual, not(sameInstance(expected)))`;
     - 使用 Hamcrest 匹配器(如 `is()`、`not()`)来进行精确且可读性高的断言。
  - 测试用例的真实值应名为为 actual XXX,期望值应命名为 expected XXX。
- - 测试类和 `@Test` 标注的方法无需 JAVADOC。
  - 使用 `mock` 应遵循如下规范:
    - 数据库、缓存、注册中心、网络调用、时间以及其他重量级外部依赖应使用 mock,不要连接外部环境。
    - 与被测行为无关且嵌套超过两层的对象应使用 mock;不要构造深层无关对象图。
diff --git a/docs/community/content/involved/conduct/code.en.md 
b/docs/community/content/involved/conduct/code.en.md
index 7c3f95f5c72..05223280883 100644
--- a/docs/community/content/involved/conduct/code.en.md
+++ b/docs/community/content/involved/conduct/code.en.md
@@ -114,7 +114,6 @@ The following code of conduct is based on full compliance 
with the [Apache Softw
     - Reference non-identity assertions must use `assertThat(actual, 
not(sameInstance(expected)))`;
     - Use Hamcrest matchers like `is()`, `not()` for precise and readable 
assertions.
 - The actual values in test cases should be named actual XXX, and expected 
values should be named expected XXX.
-- Test classes and methods marked with `@Test` do not need JAVADOC.
 - Using `mock` should follow the following specifications:
     - Mock databases, caches, registries, network calls, time, and other heavy 
external dependencies instead of connecting to external environments.
     - Mock objects with more than two levels of nesting when they are 
unrelated to the behavior under test; do not construct deep unrelated object 
graphs.
diff --git a/src/resources/checkstyle.xml b/src/resources/checkstyle.xml
index 91dfc356323..9f0fcda68dc 100644
--- a/src/resources/checkstyle.xml
+++ b/src/resources/checkstyle.xml
@@ -191,7 +191,7 @@
         <module name="JavadocBlockTagLocation" />
         <module name="JavadocContentLocation" />
         <module name="JavadocMethod">
-            <property name="allowedAnnotations" value="Override, Test, 
BeforeEach, AfterEach, BeforeAll, AfterAll, ParameterizedTest" />
+            <property name="allowedAnnotations" value="Override, Test, 
BeforeEach, AfterEach, BeforeAll, AfterAll, ParameterizedTest, RepeatedTest, 
TestFactory, TestTemplate" />
             <property name="validateThrows" value="true" />
             <property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF" />
         </module>
@@ -202,6 +202,7 @@
         </module>
         <module name="JavadocType" />
         <module name="MissingJavadocMethod">
+            <property name="allowedAnnotations" value="Override, Test, 
BeforeEach, AfterEach, BeforeAll, AfterAll, ParameterizedTest, RepeatedTest, 
TestFactory, TestTemplate" />
             <property name="allowMissingPropertyJavadoc" value="true" />
             <property name="tokens" value="METHOD_DEF" />
         </module>

Reply via email to