Archived
fix(ci): update PMD rules for test conventions
- Allow underscores in JUnit 5 test method names (BDD style) - Exclude LinguisticNaming (getter-like test names are fine) - Exclude LocalVariableCouldBeFinal (var is readable in tests) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a7f4b501d
commit
71fee587c7
1 file changed
+7
@@ -48,6 +48,10 @@
|
||||
<exclude name="CommentDefaultAccessModifier"/>
|
||||
<!-- Java 21+ has useful implicit classes -->
|
||||
<exclude name="UnnecessaryFullyQualifiedName"/>
|
||||
<!-- Test methods with getter-like names are fine -->
|
||||
<exclude name="LinguisticNaming"/>
|
||||
<!-- Local variables don't need final -->
|
||||
<exclude name="LocalVariableCouldBeFinal"/>
|
||||
</rule>
|
||||
|
||||
<rule ref="category/java/codestyle.xml/ClassNamingConventions">
|
||||
@@ -60,9 +64,12 @@
|
||||
<properties>
|
||||
<property name="methodPattern" value="[a-z][a-zA-Z0-9]*"/>
|
||||
<property name="nativePattern" value="[a-z][a-zA-Z0-9]*"/>
|
||||
<!-- Allow underscores in JUnit 5 test methods for BDD naming -->
|
||||
<property name="junit5TestPattern" value="[a-z][a-zA-Z0-9_]*"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- DESIGN -->
|
||||
<!-- ================================================================== -->
|
||||
|
||||
Reference in new issue
Block a user