Skip to content

Commit

Permalink
Issue #12099: Add ArchUnit test to ensure fields in modules and utils…
Browse files Browse the repository at this point in the history
… are immutable, and modules are correctly annotated
  • Loading branch information
Vyom-Yadav committed Sep 11, 2022
1 parent 9f974c0 commit dc72712
Show file tree
Hide file tree
Showing 2 changed files with 489 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/pmd-test.xml
Expand Up @@ -119,7 +119,9 @@
from the test method.
In XdocsPagesTest PMD does not find asserts in lambdas.
All test classes which starts with XpathRegression have asserts inside parent's method.
In ArchUnitTest assertion calls are not required as they are called by the library -->
In ArchUnitTest assertion calls are not required as they are called by the library
In ImmutabilityTest assertion calls are not required as they are called
by the library -->
<property name="violationSuppressXPath"
value="//ClassOrInterfaceDeclaration[@SimpleName='AllChecksTest'
or @SimpleName='AstRegressionTest'
Expand All @@ -132,6 +134,8 @@
//MethodDeclaration[@Name='testAllCheckSectionJavaDocs']
| //ClassOrInterfaceDeclaration[starts-with(@SimpleName,'XpathRegression')]
//MethodDeclaration
| //ClassOrInterfaceDeclaration[@SimpleName='ImmutabilityTest']
//MethodDeclaration
| //ClassOrInterfaceDeclaration[@SimpleName='ArchUnitTest']
//MethodDeclaration"/>
</properties>
Expand Down

0 comments on commit dc72712

Please sign in to comment.