This is an automated email from the ASF dual-hosted git repository.
funky-eyes pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push:
new c08f264cb3 optimize: allow underscores in test method names (#8087)
c08f264cb3 is described below
commit c08f264cb3c48691b7ccc276c878e8a251352457
Author: 徐晓伟 <[email protected]>
AuthorDate: Wed May 6 09:26:23 2026 +0800
optimize: allow underscores in test method names (#8087)
---
changes/en-us/2.x.md | 2 +-
changes/zh-cn/2.x.md | 2 +-
style/checkstyle.xml | 19 ++++++++++++++++++-
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index a489c84f07..5b480fc031 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -62,7 +62,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#8031](https://github.com/apache/incubator-seata/pull/8031)] upgrade some
dependencies versions
- [[#8030](https://github.com/apache/incubator-seata/pull/8030)] add the
dependency jackson-datatype-jsr310
- [[#8043](https://github.com/apache/incubator-seata/pull/8043)] simplify
jackson related dependencies
--
[[#8057](https://github.com/apache/incubator-seata/pull/8057)]/[[#8085](https://github.com/apache/incubator-seata/pull/8085)]
remove p3c, use maven-checkstyle-plugin, only check PR changes
+-
[[#8057](https://github.com/apache/incubator-seata/pull/8057)]/[[#8085](https://github.com/apache/incubator-seata/pull/8085)]/[[#8087](https://github.com/apache/incubator-seata/pull/8087)]
remove p3c, use maven-checkstyle-plugin, only check PR changes
- [[#8063](https://github.com/apache/incubator-seata/pull/8063)] bump
commons-io:commons-io from 2.8.0 to 2.21.0
- [[#8064](https://github.com/apache/incubator-seata/pull/8064)] bump
org.apache.kafka:kafka-clients from 3.6.1 to 3.9.2
- [[#8069](https://github.com/apache/incubator-seata/pull/8069)] bump
org.assertj:assertj-core from 3.12.2 to 3.27.7
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index ff09d84008..85b24c2840 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -62,7 +62,7 @@
- [[#8031](https://github.com/apache/incubator-seata/pull/8031)] 升级一些依赖版本
- [[#8030](https://github.com/apache/incubator-seata/pull/8030)] 添加依赖
jackson-datatype-jsr310
- [[#8043](https://github.com/apache/incubator-seata/pull/8043)] 简化 jackson
相关依赖
--
[[#8057](https://github.com/apache/incubator-seata/pull/8057)]/[[#8085](https://github.com/apache/incubator-seata/pull/8085)]
删除 p3c, 使用 maven-checkstyle-plugin, 仅检查 PR 变更
+-
[[#8057](https://github.com/apache/incubator-seata/pull/8057)]/[[#8085](https://github.com/apache/incubator-seata/pull/8085)]/[[#8087](https://github.com/apache/incubator-seata/pull/8087)]
删除 p3c, 使用 maven-checkstyle-plugin, 仅检查 PR 变更
- [[#8063](https://github.com/apache/incubator-seata/pull/8063)] 将
commons-io:commons-io 从 2.8.0 版本升级到 2.21.0 版本
- [[#8064](https://github.com/apache/incubator-seata/pull/8064)] 将
org.apache.kafka:kafka-clients 从 3.6.1 版本升级到 3.9.2 版本
- [[#8069](https://github.com/apache/incubator-seata/pull/8069)] 将
org.assertj:assertj-core 从 3.12.2 版本升级到 3.27.7
diff --git a/style/checkstyle.xml b/style/checkstyle.xml
index cb1c311031..8211429169 100644
--- a/style/checkstyle.xml
+++ b/style/checkstyle.xml
@@ -47,6 +47,16 @@
<property name="files" value="MySqlLexer\.java$"/>
</module>
+ <!-- MethodName: source files (no underscores) vs test files (underscores
allowed) -->
+ <module name="SuppressionSingleFilter">
+ <property name="id" value="MethodNameSource"/>
+ <property name="files" value=".*[\\/]test[\\/].*"/>
+ </module>
+ <module name="SuppressionSingleFilter">
+ <property name="id" value="MethodNameTest"/>
+ <property name="files" value="^(?!.*[\\/]test[\\/].*).*$"/>
+ </module>
+
<!-- Allow using @SuppressWarnings("checkstyle:...") in code -->
<module name="SuppressWarningsFilter"/>
@@ -63,7 +73,14 @@
<module name="MemberName"/>
<module name="LocalVariableName"/>
<module name="ParameterName"/>
- <module name="MethodName"/>
+ <module name="MethodName">
+ <property name="id" value="MethodNameSource"/>
+ <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+ </module>
+ <module name="MethodName">
+ <property name="id" value="MethodNameTest"/>
+ <property name="format"
value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
+ </module>
<module name="PackageName"/>
<module name="ArrayTypeStyle"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]