apache / apache/maven-pmd-plugin
[MPMD-236] Honor pmd:pmd/cpd config in pmd:check/cpd-check goals
- Dominant language
- Java
- Stars
- 66
- Forks
- 55
- Avg merge
- 8d 16h
- Merged PRs (30d)
- 7
Description
**[Alex Rentz](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alexrentz)** opened **[MPMD-236](https://issues.apache.org/jira/browse/MPMD-236?redirect=false)** and commented
In the PMD plugin, it seems that configuration for the pmd:pmd and cpd:cpd goals that are executed transitively by way of the pmd:check and cpd:cpd-check goals are not honored. For example, here's the specific issue I am seeing.
Let's say I need to run pmd on tests and want to fail the build. Intuitively you'd think I could do pmd:check and set includeTests=true. However, this doesn't work because pmd:check doesn't support includeTests. I am not interested in generating the report, and per the site documentation for the plugin, pmd:check generates the report anyway. However, it doesn't support the configuration associated with pmd:pmd.
What I would like to do is this (which doesn't work):
```xml
pmd-check
check
verify
${pmd.includeTests}
```
What I have is this:
```xml
pmd-check
check
pmd
verify
${pmd.includeTests}
```
---
**Issue Links:**
- [MPMD-242](https://issues.apache.org/jira/browse/MPMD-242) RFE: Option to apply different rules for main and test sources
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.