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 12, 2022
1 parent 0167a94 commit ec8c7a3
Show file tree
Hide file tree
Showing 2 changed files with 474 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/pmd-test.xml
Expand Up @@ -119,8 +119,8 @@
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, ArchUnitSuperClassTest assertion calls are not required as they
are called by the library -->
In ArchUnitTest, ArchUnitSuperClassTest, 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 @@ -133,6 +133,8 @@
//MethodDeclaration[@Name='testAllCheckSectionJavaDocs']
| //ClassOrInterfaceDeclaration[starts-with(@SimpleName,'XpathRegression')]
//MethodDeclaration
| //ClassOrInterfaceDeclaration[@SimpleName='ImmutabilityTest']
//MethodDeclaration
| //ClassOrInterfaceDeclaration[@SimpleName='ArchUnitTest']
//MethodDeclaration
| //ClassOrInterfaceDeclaration[@SimpleName='ArchUnitSuperClassTest']
Expand Down

0 comments on commit ec8c7a3

Please sign in to comment.