Search code examples
javamavenpmd

How do I make PMD also check my test code?


I've got a Maven Java project that runs PMD to check the production code. How do I make PMD also check the test code?

I read several docs and guides, but couldn't find anything.


Solution

  • Found the answer myself. <includeTests>true</includeTests> within the <configuration> part of the PMD Maven plugin, as described in https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#includeTests.