You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Dangel (JIRA)" <ji...@apache.org> on 2017/03/31 10:31:41 UTC

[jira] [Commented] (MPMD-232) Enable typeResolution by default

    [ https://issues.apache.org/jira/browse/MPMD-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950660#comment-15950660 ] 

Andreas Dangel commented on MPMD-232:
-------------------------------------

Then typeresolution is enabled, the compile classpath is used as PMD's auxclasspath. If additionally tests are included in the analysis (option [includeTests|https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#includeTests]), then the test classpath is used instead.
So, it should be fine.


> Enable typeResolution by default
> --------------------------------
>
>                 Key: MPMD-232
>                 URL: https://issues.apache.org/jira/browse/MPMD-232
>             Project: Maven PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>            Reporter: Juan Martín Sotuyo Dodero
>             Fix For: 3.8
>
>
> For some time now PMD has supported type resolution, allowing PMD rules to make better decisions by having knowledge of all classes in both the project, and the classpath.
> However, when using PMD through the Maven plugin, the auxclasspath for type resolution is not populated by default. There is a property to control this behavior, but it's set to false by default. See https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#typeResolution
> I believe there is no reason to have it off by default (actually, I don't think there is any valid reason to have it off at all!). Type resolution means better and more accurate analysis results. If there are no rules configured requiring type resolution, the type resolution analysis is skipped completely, meaning there is no performance impact either.
> I've not checked, but just in case the classpath passed to PMD should include:
> - all dependencies
> - the .class files generated by compiling the project's source code



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)